This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix memory leak in dlerror.c


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That's no memory leak.  The data is still live when the program
terminates.  And the change you proposed might handle the case youu came
across but it is no general solution.  This is thread-local data.  I.e.,
the freeing would have to be executed by each and everything thread.
But there is no way to do this.

dlerror is a misdesigned interface.  It doesn't allow a better
implementation without imposing runtime overhead.  The latter is not
acceptable just for the purpose of tracking leak (which this isn't!).

Just get valgrind to ignore this case.

- -- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAkxdifwACgkQ2ijCOnn/RHQ9ogCffkSJ3Nr97iqLXTFtzv+ymZLy
klIAnRSTIg4IMhpwOORQd+K5W3+DJYGw
=BCl+
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]