getaddrinfo thread-safe?

Joshua Rogers glibc@internot.info
Mon Mar 23 19:50:00 GMT 2015


On 24/03/15 06:19, Carlos O'Donell wrote:
> Could you do me a favour please? Look for a matching bug in the bugzilla and
> file one if it doesn't exist? Despite the fact that this is a benign race
> it should still be fixed so it doesn't race. The bug should say that this
> is a benign race that needs fixing.
Done! I couldn't find any other report for this specific case.


I am concerned about one of the other reports race conditions by
valgrind: http://pastebin.com/n1YMbgB2

'lock' is defined in files-XXX.c:
__libc_lock_define_initialized (static, lock)

However, I don't understand the warning from valgrind.

In thread 4, pthread_mutex_lock is called on 'lock', on L127 of
files-hosts.c. That's all OK:   __libc_lock_lock (lock);

But then, it is unlocked in thread 3? I don't understand that.

However, I'm going to take a look into the other warnings now.


Thanks,

-- 
-- Joshua Rogers <https://internot.info/>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-help/attachments/20150323/643ca079/attachment.sig>


More information about the Libc-help mailing list