dlopen: Remove incorrect assert in activate_nodelete (#1778344)

This commit is contained in:
Florian Weimer 2019-12-02 10:02:46 +01:00
parent 17391589c0
commit 761a9384b6
2 changed files with 29 additions and 1 deletions

24
glibc-rh1778344.patch Normal file
View File

@ -0,0 +1,24 @@
Emergency patch for #1778344: A reference to a unique symbol in
libstdc++ causes it to be marked as NODELETE (as expected), but the
assert is not prepared for that situation.
diff --git a/elf/dl-open.c b/elf/dl-open.c
index df9f29a5e5683bf2..763e90187afaf09a 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -452,12 +452,9 @@ activate_nodelete (struct link_map *new, int mode)
_dl_debug_printf ("activating NODELETE for %s [%lu]\n",
imap->l_name, imap->l_ns);
- /* Only new objects should have set
- link_map_nodelete_pending. Existing objects should not
- have gained any new dependencies and therefore cannot
- reach NODELETE status. */
- assert (!imap->l_init_called || imap->l_type != lt_loaded);
-
+ /* Note that this can also activate NODELETE for objects
+ which had already been loaded at the time of the dlopen
+ call. */
imap->l_nodelete = link_map_nodelete_active;
}
}

View File

@ -87,7 +87,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 21%{?dist}
Release: 22%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries.
@ -158,6 +158,7 @@ Patch17: glibc-cs-path.patch
Patch18: glibc-c-utf8-locale.patch
Patch23: glibc-python3.patch
Patch29: glibc-fedora-nsswitch.patch
Patch30: glibc-rh1778344.patch
##############################################################################
# Continued list of core "glibc" package information:
@ -2041,6 +2042,9 @@ fi
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Mon Dec 2 2019 Florian Weimer <fweimer@redhat.com> - 2.30.9000-22
- dlopen: Remove incorrect assert in activate_nodelete (#1778344)
* Thu Nov 28 2019 Florian Weimer <fweimer@redhat.com> - 2.30.9000-21
- Auto-sync with upstream branch master,
commit e37c2cf299b61ce18f62852f6c5624c27829b610: