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

Re: [PATCH] Save/restore h_errno in getaddrinfo()


Stan Shebs <stanshebs@google.com> writes:

> It's this test at getaddrinfo.c:1047:
>
>           if (h_errno == NETDB_INTERNAL)
>             {
>               result = -EAI_SYSTEM;
>               goto free_and_return;
>             }
>
> which was extensively discussed back in May 2013:
>
> https://sourceware.org/ml/libc-alpha/2013-05/msg00743.html
>
> Given the number of failure modes that people were tearing their hair
> out over in that thread, it's probably that everybody convinced
> themselves that one couldn't get there without having set status to
> something nonzero.  Perhaps the fix is as simple as testing status and
> then h_errno?

h_errno is like errno and undefined unless an error occurred so this
is the place to be fixed.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


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