From the upstream bug report:
At line 237 in gai_misc.c:
lastp = requests_tail;
if (requests_tail == NULL)
requests = requests_tail = newp;
If requests_tail was NULL then lastp remains NULL.
Unfortunately if gai_create_helper_thread fails, lastp is de-referenced at line 267 which will cause a SIGSEGV.
This should be reproducible with a custom malloc which fails after the right number of allocations.
Author: Andreas Schwab <email@example.com>
Date: Mon Nov 5 12:47:30 2018 +0100
libanl: properly cleanup if first helper thread creation failed (bug 22927)
Verified with modified __gai_create_helper_thread() function which always returns -1 and a test that calls getaddrinfo_a(). In glibc-2.17-269.el7 getaddrinfo_a() doesn't crash but returns EAGAIN.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.