This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26.9000-1107-gf993b87


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  f993b8754080ac7572b692870e926d8b493db16c (commit)
      from  09085ede12fb9650f286bdcd805609ae69f80618 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f993b8754080ac7572b692870e926d8b493db16c

commit f993b8754080ac7572b692870e926d8b493db16c
Author: Florian Weimer <fweimer@redhat.com>
Date:   Wed Jan 10 13:18:04 2018 +0100

    nptl: Open libgcc.so with RTLD_NOW during pthread_cancel [BZ #22636]
    
    Disabling lazy binding reduces stack usage during unwinding.
    
    Note that RTLD_NOW only makes a difference if libgcc.so has not
    already been loaded, so this is only a partial fix.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

diff --git a/ChangeLog b/ChangeLog
index b1da834..1065883 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-10  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #22636]
+	* sysdeps/nptl/unwind-forcedunwind.c (pthread_cancel_init): Open
+	libgcc.so with RTLD_NOW, to avoid lazy binding during unwind.
+
 2018-01-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
 	* hurd/hurd/fd.h: Include <fcntl.h>
diff --git a/sysdeps/nptl/unwind-forcedunwind.c b/sysdeps/nptl/unwind-forcedunwind.c
index ab4350d..67b8e74 100644
--- a/sysdeps/nptl/unwind-forcedunwind.c
+++ b/sysdeps/nptl/unwind-forcedunwind.c
@@ -49,7 +49,7 @@ pthread_cancel_init (void)
       return;
     }
 
-  handle = __libc_dlopen (LIBGCC_S_SO);
+  handle = __libc_dlopen_mode (LIBGCC_S_SO, RTLD_NOW | __RTLD_DLOPEN);
 
   if (handle == NULL
       || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                          |    6 ++++++
 sysdeps/nptl/unwind-forcedunwind.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]