[talk] Is getaddrinfo thread-safe on OS X?
Siobhan Lynch
slynch2112 at me.com
Sun Jan 3 00:10:55 EST 2016
> On Jan 2, 2016, at 9:43 PM, A. Jesse Jiryu Davis <jesse at emptysquare.net> wrote:
>
> Hi NYC*BUG folk. I'm a MongoDB coder and CPython contributor in NYC. I hope you can help me answer a Darwin / Mac OS X question.
>
> There's rampant speculation regarding whether Mac OS X's implementation of getaddrinfo is thread-safe. Uncertainty is so widespread that even the Python standard library locks around calls to getaddrinfo to avoid a possible bug:
>
> https://hg.python.org/cpython/file/d2b8354e87f5/Modules/socketmodule.c#l185 <https://hg.python.org/cpython/file/d2b8354e87f5/Modules/socketmodule.c#l185>
>
> There was a FreeBSD bug "getaddrinfo not thread-safe" resolved back in 2006, but I don't know if Darwin and / or Mac OS X got the same bugfix, or a different bugfix, or no bugfix. I have a deeper ignorance, too, about the relationship between the FreeBSD, Darwin, and Mac OS X implementations of libc functions like getaddrinfo. I don't know where to look for OS X's implementation of getaddrinfo either (I can't find it on opensource.apple.com <http://opensource.apple.com/>).
>
> Is there a Darwin or OS X expert on the list who could help me investigate?
Use the Source? The Darwin source and revision history should be available (just not for the Mac OS X specific stuff) - has anyone actually gone in to see? That seems like the way to do it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20160103/1d1930e0/attachment.html>
More information about the talk
mailing list