[Bug dynamic-link/25396] [2.31 Regression] FAIL: nss/test-netdb
hjl.tools at gmail dot com
sourceware-bugzilla@sourceware.org
Thu Jan 16 03:43:00 GMT 2020
https://sourceware.org/bugzilla/show_bug.cgi?id=25396
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
There is
/* Remember whether this object must be initialized first. */
if (l->l_flags_1 & DF_1_INITFIRST)
GL(dl_initfirst) = l;
libpthread.so.0 has
0x000000006ffffffb (FLAGS_1) Flags: NOW NODELETE INITFIRST
_dl_close_worker unloaded libpthread.so.0 which left GL(dl_initfirst)
unchanged. This patch:
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 104c299209..2d426d8737 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -756,6 +756,9 @@ _dl_close_worker (struct link_map *map, bool force)
if (imap->l_runpath_dirs.dirs != (void *) -1)
free (imap->l_runpath_dirs.dirs);
+ if (imap == GL(dl_initfirst))
+ GL(dl_initfirst) = NULL;
+
free (imap);
}
}
seems to work.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list