[glibc] 01/02: debian/patches/any/submitted-dlopen-noload.diff: new patch to fix a crash in dlopen() with RTLD_NOLOAD. Closes: #817900.
This is an automated email from the git hooks/post-receive script.
aurel32 pushed a commit to branch sid
in repository glibc.
commit 35c7291d5f65e92f31966c65b64a6d958959e7a7
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Sat Mar 12 22:40:02 2016 +0100
debian/patches/any/submitted-dlopen-noload.diff: new patch to fix a crash in dlopen() with RTLD_NOLOAD. Closes: #817900.
---
debian/changelog | 2 ++
debian/patches/any/submitted-dlopen-noload.diff | 33 +++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 36 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index be23ebe..e379f1c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ glibc (2.22-3) UNRELEASED; urgency=medium
* debian/sysdeps/powerpcspe.mk: pass --without-fp to the configure script
on powerpcspe. Closes: #817926.
* debian/rules.d/control.mk: add nios2 architecture. Closes: #817944.
+ * debian/patches/any/submitted-dlopen-noload.diff: new patch to fix a crash
+ in dlopen() with RTLD_NOLOAD. Closes: #817900.
-- Aurelien Jarno <aurel32@debian.org> Thu, 10 Mar 2016 22:29:17 +0100
diff --git a/debian/patches/any/submitted-dlopen-noload.diff b/debian/patches/any/submitted-dlopen-noload.diff
new file mode 100644
index 0000000..3a7d88c
--- /dev/null
+++ b/debian/patches/any/submitted-dlopen-noload.diff
@@ -0,0 +1,33 @@
+2016-03-12 Aurelien Jarno <aurelien@aurel32.net>
+
+ [BZ #19810]
+ * elf/dl-open.c (dl_open_worker): Set DF_1_NODELETE flag later.
+
+--- a/elf/dl-open.c
++++ b/elf/dl-open.c
+@@ -226,12 +226,6 @@ dl_open_worker (void *a)
+ args->map = new = _dl_map_object (call_map, file, lt_loaded, 0,
+ mode | __RTLD_CALLMAP, args->nsid);
+
+- /* Mark the object as not deletable if the RTLD_NODELETE flags was passed.
+- Do this early so that we don't skip marking the object if it was
+- already loaded. */
+- if (__glibc_unlikely (mode & RTLD_NODELETE))
+- new->l_flags_1 |= DF_1_NODELETE;
+-
+ /* If the pointer returned is NULL this means the RTLD_NOLOAD flag is
+ set and the object is not already loaded. */
+ if (new == NULL)
+@@ -240,6 +234,12 @@ dl_open_worker (void *a)
+ return;
+ }
+
++ /* Mark the object as not deletable if the RTLD_NODELETE flags was passed.
++ Do this early so that we don't skip marking the object if it was
++ already loaded. */
++ if (__glibc_unlikely (mode & RTLD_NODELETE))
++ new->l_flags_1 |= DF_1_NODELETE;
++
+ if (__glibc_unlikely (mode & __RTLD_SPROF))
+ /* This happens only if we load a DSO for 'sprof'. */
+ return;
diff --git a/debian/patches/series b/debian/patches/series
index 1edbed6..b48365b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -241,3 +241,4 @@ any/cvs-grantpt-namespace.diff
any/cvs-grantpt-pty-owner.diff
any/cvs-bits-libc-stdio-lock.diff
any/submitted-hle-checking-mutex.diff
+any/submitted-dlopen-noload.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git
Reply to: