bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible leak in elf/dl_open.c


From: Michael Meeks
Subject: Re: possible leak in elf/dl_open.c
Date: Sat, 8 Dec 2001 15:21:45 -0500 (EST)

Hi Ulrich,

On 7 Dec 2001, Ulrich Drepper wrote:
> Have you even looked at what strdupa() does?

        Yes - that was an amusingly stupid bug report;

        Assuming memprof is at all capable of finding this sort of leak:

[snip]
#include <stdlib.h>
#include <dlfcn.h>

int main (int argc, char **argv)
{
        void *handlea;

        handlea = dlopen ("/lib/libc.so.6", RTLD_GLOBAL | RTLD_LAZY);
        dlclose (handlea);

        sleep (1000);

        return 0;
}
[snip]

        Shows two 'leaks' under it:

52 bytes:
add_to_global    105 dl-open.c
dl_open_worker   366 dl-open.c
_dl_catch_error  153 dl-error.c
_dl_open         411 dl-open.c
dlopen_doit      39  dlopen.c

and:

20 bytes:
_dl_map_object_deps 531 dl-deps.c
dl_open_worker      255 dl-open.c
_dl_catch_error     153 dl-error.c
dlopen_doit         39  dlopen.c

        Of course - could just be memprof messing with me, but it should
be somewhat conservative.

        Regards,

                Michael.

-- 
 address@hidden  <><, Pseudo Engineer, itinerant idiot




reply via email to

[Prev in Thread] Current Thread [Next in Thread]