The variable "ai" in _dns_getaddrinfo (in getaddrinfo.c) needs to be initialized to NULL. This was introduced by revision 282444 in the current branch and has been pushed into stable/9. Didn't check stable/10.
The affect of this will be to return too many addresses in some cases; so, it's not as bad as one might first think.
(In reply to Herbie.Robinson from comment #0) The revision was r292444; not r282444. CCing ume@ -- will check this over really quickly to see how easy it would be to fix this/see if there are any Coverity CIDs for it.
It's passed lib/libc/nss/... so far. Working on lib/libc/resolv/... and lib/libthr/resolv_test and will run some more tests tonight. Need to verify with gcc/gcc 5.3.0 as well to make sure building libc there is still ok.
A commit references this bug: Author: ngie Date: Sat Aug 13 02:05:07 UTC 2016 New revision: 304034 URL: https://svnweb.freebsd.org/changeset/base/304034 Log: Initialize `ai` to NULL and test for `ai` with type-appropriate values Depending on the address family and ai_flags containing AI_V4MAPPED, it might not do a proper DNS lookup on the provided DNS address Convert some `ai` boolean true/false checks to NULL/non-NULL while here. MFC after: 1 week PR: 211790 Reported by: Herbie.Robinson@stratus.com Sponsored by: EMC / Isilon Storage Division Changes: head/lib/libc/net/getaddrinfo.c
A commit references this bug: Author: ngie Date: Sun Aug 28 07:08:30 UTC 2016 New revision: 304945 URL: https://svnweb.freebsd.org/changeset/base/304945 Log: MFC r304034: Initialize `ai` to NULL and test for `ai` with type-appropriate values Depending on the address family and ai_flags containing AI_V4MAPPED, it might not do a proper DNS lookup on the provided DNS address Convert some `ai` boolean true/false checks to NULL/non-NULL while here. PR: 211790 Changes: _U stable/11/ stable/11/lib/libc/net/getaddrinfo.c
A commit references this bug: Author: ngie Date: Mon Aug 29 05:46:36 UTC 2016 New revision: 304982 URL: https://svnweb.freebsd.org/changeset/base/304982 Log: MFstable/11 r304945: MFC r304034: Initialize `ai` to NULL and test for `ai` with type-appropriate values Depending on the address family and ai_flags containing AI_V4MAPPED, it might not do a proper DNS lookup on the provided DNS address Convert some `ai` boolean true/false checks to NULL/non-NULL while here. PR: 211790 Changes: _U stable/10/ stable/10/lib/libc/net/getaddrinfo.c
A commit references this bug: Author: ngie Date: Mon Aug 29 07:46:24 UTC 2016 New revision: 304990 URL: https://svnweb.freebsd.org/changeset/base/304990 Log: MFstable/10 r304982: MFstable/11 r304945: MFC r304034: Initialize `ai` to NULL and test for `ai` with type-appropriate values Depending on the address family and ai_flags containing AI_V4MAPPED, it might not do a proper DNS lookup on the provided DNS address Convert some `ai` boolean true/false checks to NULL/non-NULL while here. PR: 211790 Changes: _U stable/9/ _U stable/9/lib/ _U stable/9/lib/libc/ stable/9/lib/libc/net/getaddrinfo.c