Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2018 10:06:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 232235] valgrind doesn't find trivial leak on head anymore, works on stable/11
Message-ID:  <bug-232235-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232235

            Bug ID: 232235
           Summary: valgrind doesn't find trivial leak on head anymore,
                    works on stable/11
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Keywords: regression
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: tuexen@freebsd.org
 Attachment #198117 text/plain
         mime type:

Created attachment 198117
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D198117&action=
=3Dedit
Sample program leaking 1KB

When testing valgrind on a stable/11 amd64 system with the attached test
program leak.c results in what is expected:

tuexen@stable11:~ % cc -o leak leak.c
tuexen@stable11:~ % valgrind --leak-check=3Dfull ./leak
=3D=3D56478=3D=3D Memcheck, a memory error detector
=3D=3D56478=3D=3D Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward =
et al.
=3D=3D56478=3D=3D Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyr=
ight info
=3D=3D56478=3D=3D Command: ./leak
=3D=3D56478=3D=3D=20
=3D=3D56478=3D=3D=20
=3D=3D56478=3D=3D HEAP SUMMARY:
=3D=3D56478=3D=3D     in use at exit: 1,024 bytes in 1 blocks
=3D=3D56478=3D=3D   total heap usage: 1 allocs, 0 frees, 1,024 bytes alloca=
ted
=3D=3D56478=3D=3D=20
=3D=3D56478=3D=3D 1,024 bytes in 1 blocks are definitely lost in loss recor=
d 1 of 1
=3D=3D56478=3D=3D    at 0x4C255B5: malloc (in
/usr/local/lib/valgrind/vgpreload_memcheck-amd64-freebsd.so)
=3D=3D56478=3D=3D    by 0x4007BA: main (in /usr/home/tuexen/leak)
=3D=3D56478=3D=3D=20
=3D=3D56478=3D=3D LEAK SUMMARY:
=3D=3D56478=3D=3D    definitely lost: 1,024 bytes in 1 blocks
=3D=3D56478=3D=3D    indirectly lost: 0 bytes in 0 blocks
=3D=3D56478=3D=3D      possibly lost: 0 bytes in 0 blocks
=3D=3D56478=3D=3D    still reachable: 0 bytes in 0 blocks
=3D=3D56478=3D=3D         suppressed: 0 bytes in 0 blocks
=3D=3D56478=3D=3D=20
=3D=3D56478=3D=3D For counts of detected and suppressed errors, rerun with:=
 -v
=3D=3D56478=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 fr=
om 0)

whereas on a head system (r339354) amd64 I get:

tuexen@epyc:~ % cc -o leak leak.c
tuexen@epyc:~ % valgrind ./leak
=3D=3D1760=3D=3D Memcheck, a memory error detector
=3D=3D1760=3D=3D Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward e=
t al.
=3D=3D1760=3D=3D Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyri=
ght info
=3D=3D1760=3D=3D Command: ./leak
=3D=3D1760=3D=3D=20
=3D=3D1760=3D=3D=20
=3D=3D1760=3D=3D HEAP SUMMARY:
=3D=3D1760=3D=3D     in use at exit: 0 bytes in 0 blocks
=3D=3D1760=3D=3D   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
=3D=3D1760=3D=3D=20
=3D=3D1760=3D=3D All heap blocks were freed -- no leaks are possible
=3D=3D1760=3D=3D=20
=3D=3D1760=3D=3D For counts of detected and suppressed errors, rerun with: =
-v
=3D=3D1760=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 fro=
m 0)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232235-7788>