[vlc-devel] [vlc-commits] src: fix crash in getaddrinfo due to bugs in the OSX runtime

Felix Paul Kühne fkuehne.videolan at gmail.com
Thu Jul 4 19:27:08 CEST 2013


Hello,

On 04.07.2013, at 19:23, "Rémi Denis-Courmont" <remi at remlab.net> wrote:

> Le jeudi 4 juillet 2013 19:39:59, Felix Paul Kühne a écrit :
>> +#if defined(__APPLE__) && defined(AI_NUMERICSERV)
>> +    /* work-around a segfault in libSystem on Darwin 12 and later
>> +     * if AI_NUMERICSERV is set and servname is either NULL or "0"
>> +     * radar://13058317 */
>> +    if ((hints->ai_flags & AI_NUMERICSERV) && (servname == NULL ||
>> (servname[0] == '0' && servname[1] == 0))) +        servname = (char
>> *)"00";
>> +#endif
>> +
> 
> This makes absolutely no sense whatsoever.
> Keep your crap code parctices to MacOS specific files.

Which is precisely the reason why I intended to push the patch on this mailing list first. I'll revert it.

For your reference: the python people are experiencing the same crashes in the code base and mitigate it with a similar hack: http://bugs.python.org/issue17269

Best regards,

Felix


More information about the vlc-devel mailing list