Date: Wed, 27 Jan 2010 16:42:56 +0100 From: Gary Jennejohn <gary.jennejohn@freenet.de> To: Brandon Falk <falkman@gamozo.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Leaks in libc? Message-ID: <20100127164256.2a06177a@ernst.jennejohn.org> In-Reply-To: <4B604B43.7010203@gamozo.org> References: <4B604B43.7010203@gamozo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 27 Jan 2010 08:18:43 -0600 Brandon Falk <falkman@gamozo.org> wrote: > The simple program: >=20 > #include <stdlib.h> > #include <stdio.h> >=20 > int main() > { > puts("Apple cider"); > return 0; > } >=20 > Yields the following result in valgrind: >=20 > =3D=3D4703=3D=3D Memcheck, a memory error detector > =3D=3D4703=3D=3D Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward= et al. > =3D=3D4703=3D=3D Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyr= ight info > =3D=3D4703=3D=3D Command: ./a.out > =3D=3D4703=3D=3D > Apple cider > =3D=3D4703=3D=3D > =3D=3D4703=3D=3D HEAP SUMMARY: > =3D=3D4703=3D=3D in use at exit: 4,096 bytes in 1 blocks > =3D=3D4703=3D=3D total heap usage: 1 allocs, 0 frees, 4,096 bytes alloc= ated > =3D=3D4703=3D=3D > =3D=3D4703=3D=3D LEAK SUMMARY: > =3D=3D4703=3D=3D definitely lost: 0 bytes in 0 blocks > =3D=3D4703=3D=3D indirectly lost: 0 bytes in 0 blocks > =3D=3D4703=3D=3D possibly lost: 0 bytes in 0 blocks > =3D=3D4703=3D=3D still reachable: 0 bytes in 0 blocks > =3D=3D4703=3D=3D suppressed: 4,096 bytes in 1 blocks > =3D=3D4703=3D=3D > =3D=3D4703=3D=3D For counts of detected and suppressed errors, rerun with= : -v > =3D=3D4703=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 f= rom 0) >=20 > Any ideas why the standard libraries are leaking like this? Is it=20 > perhaps a bug with valgrind, or maybe FreeBSD automatically cleans up so= =20 > they took the cleanup out of their libc? >=20 > FreeBSD 8.0 x86_64 >=20 =46rom the valgrind FAQ "suppressed" means that a leak error has been suppressed. There are some suppressions in the default suppression files. You can ignore suppressed errors. AFAIK all variants of U*X recover memory used by applications when the applications exit. This is not a real leak. --- Gary Jennejohn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100127164256.2a06177a>