public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/12] getaddrinfo facelift and fixes
@ 2022-03-08 10:07 Siddhesh Poyarekar
  2022-03-08 10:07 ` [PATCH 01/12] Simplify allocations and fix merge and continue actions [BZ #28931] Siddhesh Poyarekar
                   ` (14 more replies)
  0 siblings, 15 replies; 68+ messages in thread
From: Siddhesh Poyarekar @ 2022-03-08 10:07 UTC (permalink / raw)
  To: libc-alpha; +Cc: carlos, fweimer

The gaih_inet implementation, which forms the core of getaddrinfo, is
quite complex in its implementation, making it hard to follow or debug.
Particularly, allocations for gaih_addrtuples to store intermediate
results are particularly hard to track because of the way in which it is
written.

This patchset is an attempt at cleaning up the implementation to make it
much easier to follow.  In the process, it also fixes a couple of bugs,
one that was the trigger for this cleanup and another that was
discovered during the cleanup.

Testing:

The leak reproducer in BZ #28852 could not be converted into a testsuite
test since mtrace isn't able to track the leak, so I separately verified
that it is fixed.  There is a new test for #28931 which tests a variety
of combinations with SUCCESS=merge and SUCCESS=continue.  Further, I
have built and done some smoke testing on Fedora with and without nscd
to ensure that there are no regressions resulting from this patchset.

Finally, I did a scratch build for Fedora and verified that there are no
new regressions on i686, x86_64, s390x, ppc64le and aarch64.

Siddhesh Poyarekar (12):
  Simplify allocations and fix merge and continue actions [BZ #28931]
  gaih_inet: Simplify canon name resolution
  getaddrinfo: Fix leak with AI_ALL [BZ #28852]
  gaih_inet: Simplify service resolution
  gaih_inet: make numeric lookup a separate routine
  gaih_inet: Split simple gethostbyname into its own function
  gaih_inet: Split nscd lookup code into its own function.
  gaih_inet: separate nss lookup loop into its own function
  gaih_inet: make gethosts into a function
  gaih_inet: split loopback lookup into its own function
  gaih_inet: Split result generation into its own function
  gethosts: Return EAI_MEMORY on allocation failure

 nss/Makefile                |    1 +
 nss/tst-nss-gai-actions.c   |  242 ++++++
 sysdeps/posix/getaddrinfo.c | 1518 ++++++++++++++++++-----------------
 3 files changed, 1046 insertions(+), 715 deletions(-)
 create mode 100644 nss/tst-nss-gai-actions.c

-- 
2.35.1


^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2022-03-17 22:05 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 10:07 [PATCH 00/12] getaddrinfo facelift and fixes Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 01/12] Simplify allocations and fix merge and continue actions [BZ #28931] Siddhesh Poyarekar
2022-03-08 13:52   ` Siddhesh Poyarekar
2022-03-08 21:12     ` Carlos O'Donell
2022-03-09 17:13       ` Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 02/12] gaih_inet: Simplify canon name resolution Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 03/12] getaddrinfo: Fix leak with AI_ALL [BZ #28852] Siddhesh Poyarekar
2022-03-08 11:00   ` Andreas Schwab
2022-03-08 13:45     ` Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 04/12] gaih_inet: Simplify service resolution Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 05/12] gaih_inet: make numeric lookup a separate routine Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 06/12] gaih_inet: Split simple gethostbyname into its own function Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 07/12] gaih_inet: Split nscd lookup code " Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 08/12] gaih_inet: separate nss lookup loop " Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 09/12] gaih_inet: make gethosts into a function Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 10/12] gaih_inet: split loopback lookup into its own function Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 11/12] gaih_inet: Split result generation " Siddhesh Poyarekar
2022-03-08 10:07 ` [PATCH 12/12] gethosts: Return EAI_MEMORY on allocation failure Siddhesh Poyarekar
2022-03-14  9:48 ` [PATCH v2 00/12] getaddrinfo facelift and fixes Siddhesh Poyarekar
2022-03-14  9:48   ` [PATCH v2 01/12] Simplify allocations and fix merge and continue actions [BZ #28931] Siddhesh Poyarekar
2022-03-14 10:30     ` Andreas Schwab
2022-03-14 14:15       ` Siddhesh Poyarekar
2022-03-16 20:47     ` DJ Delorie
2022-03-17  1:39       ` Siddhesh Poyarekar
2022-03-14  9:48   ` [PATCH v2 02/12] gaih_inet: Simplify canon name resolution Siddhesh Poyarekar
2022-03-16 21:12     ` DJ Delorie
2022-03-14  9:48   ` [PATCH v2 03/12] getaddrinfo: Fix leak with AI_ALL [BZ #28852] Siddhesh Poyarekar
2022-03-16 23:42     ` DJ Delorie
2022-03-17  2:30       ` Siddhesh Poyarekar
2022-03-14  9:48   ` [PATCH v2 04/12] gaih_inet: Simplify service resolution Siddhesh Poyarekar
2022-03-17  0:48     ` DJ Delorie
2022-03-14  9:48   ` [PATCH v2 05/12] gaih_inet: make numeric lookup a separate routine Siddhesh Poyarekar
2022-03-17  4:10     ` DJ Delorie
2022-03-14  9:48   ` [PATCH v2 06/12] gaih_inet: Split simple gethostbyname into its own function Siddhesh Poyarekar
2022-03-17  4:20     ` DJ Delorie
2022-03-14  9:48   ` [PATCH v2 07/12] gaih_inet: Split nscd lookup code " Siddhesh Poyarekar
2022-03-17  4:31     ` DJ Delorie
2022-03-17  6:22       ` Siddhesh Poyarekar
2022-03-14  9:48   ` [PATCH v2 08/12] gaih_inet: separate nss lookup loop " Siddhesh Poyarekar
2022-03-17  4:42     ` DJ Delorie
2022-03-17  4:59       ` Siddhesh Poyarekar
2022-03-14  9:48   ` [PATCH v2 09/12] gaih_inet: make gethosts into a function Siddhesh Poyarekar
2022-03-17  4:44     ` DJ Delorie
2022-03-14  9:48   ` [PATCH v2 10/12] gaih_inet: split loopback lookup into its own function Siddhesh Poyarekar
2022-03-17  4:51     ` DJ Delorie
2022-03-14  9:48   ` [PATCH v2 11/12] gaih_inet: Split result generation " Siddhesh Poyarekar
2022-03-17  5:05     ` DJ Delorie
2022-03-17  5:11       ` Siddhesh Poyarekar
2022-03-14  9:48   ` [PATCH v2 12/12] gethosts: Return EAI_MEMORY on allocation failure Siddhesh Poyarekar
2022-03-17  5:06     ` DJ Delorie
2022-03-14 13:21 ` [PATCH 00/12] getaddrinfo facelift and fixes Cristian Rodríguez
2022-03-14 14:16   ` Siddhesh Poyarekar
2022-03-17  8:11 ` [PATCH v3 " Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 01/12] Simplify allocations and fix merge and continue actions [BZ #28931] Siddhesh Poyarekar
2022-03-17 21:47     ` DJ Delorie
2022-03-17  8:11   ` [PATCH v3 02/12] gaih_inet: Simplify canon name resolution Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 03/12] getaddrinfo: Fix leak with AI_ALL [BZ #28852] Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 04/12] gaih_inet: Simplify service resolution Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 05/12] gaih_inet: make numeric lookup a separate routine Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 06/12] gaih_inet: Split simple gethostbyname into its own function Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 07/12] gaih_inet: Split nscd lookup code " Siddhesh Poyarekar
2022-03-17 22:02     ` DJ Delorie
2022-03-17  8:11   ` [PATCH v3 08/12] gaih_inet: separate nss lookup loop " Siddhesh Poyarekar
2022-03-17 22:05     ` DJ Delorie
2022-03-17  8:11   ` [PATCH v3 09/12] gaih_inet: make gethosts into a function Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 10/12] gaih_inet: split loopback lookup into its own function Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 11/12] gaih_inet: Split result generation " Siddhesh Poyarekar
2022-03-17  8:11   ` [PATCH v3 12/12] gethosts: Return EAI_MEMORY on allocation failure Siddhesh Poyarekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).