This is the mail archive of the glibc-bugs@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]

[Bug network/16001] calls to getaddrinfo() leak memory.


https://sourceware.org/bugzilla/show_bug.cgi?id=16001

--- Comment #7 from Alexandre Oliva <aoliva at sourceware dot org> ---
The current refcounting code is significantly different now than it was when
you reported the patch.  I see usecnt is initialized to 2 (1 use for the cache,
1 use to be freed by the caller), and it's incremented when the cached list is
reused, and decremented when the cache is replaced or when the list is freed. 
I don't see how this could possibly leak in6ai lists.  Is this what used to
leak before?  If so, can you confirm that the problem is fixed?

One problem I do see is that getaddrinfo, the only caller of check_pf, sorts a
potentially shared in6ai list without any guards to prevent multiple threads
from trying to do that concurrently and messing the array up.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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