[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    Re: HPUX-DEVTOOLS: memory leak in nlist64 on HP-UX 11.0
From:       srikanth <srikanth () cup ! hp ! com>
Date:       2001-10-02 17:57:36
[Download RAW message or body]

Jonathan Stockley wrote:

> The following program show a memory leak in nlist64() on our
> HP-UX 11.0 system. Is this a known problem and if so how do I
> find out which patch it is fixed in?

    I tried it on my system with gdb. Not only is there a memory leak,
but also each call to nlist64 tries to free unallocated memory. This
list may not be read by owners of libelf. If the program is correct,
contacting response centre or browsing the patch catalog may be your
best recourse I think.

Srikanth


>
>
> thanks,
> Jo
> --
> #include <unistd.h>
> #include <sys/types.h>
> #include <nlist.h>
>
> main()
> {
>   struct nlist64 nl[2];
>
>   memset(nl, '\0', sizeof(nl));
>   nl[0].n_name = "ncstats";
>   for(;;) {
>     nlist64("/stand/vmunix", nl);
>     sleep(1);
>   }
> }
>  _________________________________________________________________
>  To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
>     with the message UNSUBSCRIBE hpux-devtools
>  _________________________________________________________________




 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic