about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2014-03-03 17:03:35 -0800
committerPaul Pluzhnikov <ppluzhnikov@google.com>2014-03-03 17:03:35 -0800
commitad06b0b3fb44026ad1e934378803e78c84ab5b90 (patch)
tree67aec9df503ba9740a0d79dd659689d20fc73f2a
parent33838f184a353da60d4bb11c390e2e01a545889f (diff)
downloadglibc-ad06b0b3fb44026ad1e934378803e78c84ab5b90.tar.gz
glibc-ad06b0b3fb44026ad1e934378803e78c84ab5b90.tar.xz
glibc-ad06b0b3fb44026ad1e934378803e78c84ab5b90.zip
For b/5836136, do dlsym(0, "_Unwind..."), i.e. ignore libgcc_s.so.1 dlopen failure.
-rw-r--r--README.google6
-rw-r--r--nptl/sysdeps/pthread/unwind-forcedunwind.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/README.google b/README.google
index 8710245a5a..ad1924414a 100644
--- a/README.google
+++ b/README.google
@@ -187,3 +187,9 @@ sysdeps/generic/ldsodefs.h
   Forward-ported from cl/51433604 (from cl/44863-p2).
   (ppluzhnikov, google-local)
 
+nptl/sysdeps/pthread/unwind-forcedunwind.c
+  For b/5836136, do dlsym(0, "_Unwind..."), i.e. ignore libgcc_s.so.1
+  dlopen failure.
+  Forward-ported from cl/51438157.
+  (ppluzhnikov, google-local)
+
diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c
index cb94ea6c21..86a19f653b 100644
--- a/nptl/sysdeps/pthread/unwind-forcedunwind.c
+++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c
@@ -22,6 +22,7 @@
 #include <pthreadP.h>
 #include <sysdep.h>
 #include <gnu/lib-names.h>
+#include <ldsodefs.h>
 
 static void *libgcc_s_handle;
 static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
@@ -51,6 +52,10 @@ pthread_cancel_init (void)
 
   handle = __libc_dlopen (LIBGCC_S_SO);
 
+  /* Google-local: b/5836136 */
+  if (handle == NULL)
+    handle = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
+
   if (handle == NULL
       || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
       || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL