This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/3087] Memory leak in allocate_dtv (in /lib/ld-2.3.5.so), SuSE Linux 10.0
- From: "chollstein at teracortex dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 21 Aug 2006 12:33:15 -0000
- Subject: [Bug libc/3087] Memory leak in allocate_dtv (in /lib/ld-2.3.5.so), SuSE Linux 10.0
- References: <20060818105543.3087.chollstein@teracortex.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From chollstein at teracortex dot com 2006-08-21 12:33 -------
Subject: AW: Memory leak in allocate_dtv (in
/lib/ld-2.3.5.so), SuSE Linux 10.0
Thank you very much for your fast answer!
The "calloc" happens in a sub - sub function called
from "pthread_create". I assume, the memory is needed
to keep admin information about the created thread.
But why is it still needed after the subsequent "pthread_join"?
>From an application's point of view "pthread_join"
should release any resource, that "pthread_create"
claimed. Is it a bug in "pthread_join" (In which I'm
sorry to have bothered you)?
When I create 10 threads, let them do something and
join them afterwards, the reported "leak" is ten times
as big (680 Bytes, 68 Bytes for each thread).
When I create ten threads with PTHREAD_CREATE_DETACHED,
"pthread_create" cares by itself about any resources
and "pthread_join" must not be called for the thread
handles. In this case valgrind reports only one leak
of 68 Bytes.
Kind regards
Christian
>
>------- Additional Comments From drepper at redhat dot com 2006-08-20 22:23
>-------
>This is no memory leak. It's memory needed for the main thread which cannot
>be
>freed while the program is running.
>
>--
> What |Removed |Added
>----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> Resolution| |INVALID
>
>
>http://sourceware.org/bugzilla/show_bug.cgi?id=3087
>
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3087
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.