about summary refs log tree commit diff
path: root/sysdeps/gnu
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-12-16 15:14:03 -0800
committerRoland McGrath <roland@hack.frob.com>2014-12-16 15:47:53 -0800
commit3eb5d2fc71c973b95c9678b0644c26c615668218 (patch)
tree3c722912795bd0ca7621cfb5a1e9f6063d477e9f /sysdeps/gnu
parentf0481d971e9941004814009c1b0877a43aa10bdb (diff)
downloadglibc-3eb5d2fc71c973b95c9678b0644c26c615668218.tar.gz
glibc-3eb5d2fc71c973b95c9678b0644c26c615668218.tar.xz
glibc-3eb5d2fc71c973b95c9678b0644c26c615668218.zip
Use PTR_MANGLE on libgcc unwinder function pointers.
Diffstat (limited to 'sysdeps/gnu')
-rw-r--r--sysdeps/gnu/unwind-resume.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c
index 5044a7182e..358b3d547d 100644
--- a/sysdeps/gnu/unwind-resume.c
+++ b/sysdeps/gnu/unwind-resume.c
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <unwind.h>
 #include <gnu/lib-names.h>
+#include <sysdep.h>
 
 static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
   __attribute__ ((noreturn));
@@ -41,7 +42,9 @@ init (void)
     __libc_fatal (LIBGCC_S_SO
                   " must be installed for pthread_cancel to work\n");
 
+  PTR_MANGLE (resume);
   libgcc_s_resume = resume;
+  PTR_MANGLE (personality);
   libgcc_s_personality = personality;
 }
 
@@ -50,7 +53,10 @@ _Unwind_Resume (struct _Unwind_Exception *exc)
 {
   if (__glibc_unlikely (libgcc_s_resume == NULL))
     init ();
-  (*libgcc_s_resume) (exc);
+
+  __typeof (libgcc_s_resume) resume = libgcc_s_resume;
+  PTR_DEMANGLE (resume);
+  (*resume) (exc);
 }
 
 _Unwind_Reason_Code
@@ -61,6 +67,9 @@ __gcc_personality_v0 (int version, _Unwind_Action actions,
 {
   if (__glibc_unlikely (libgcc_s_personality == NULL))
     init ();
-  return (*libgcc_s_personality) (version, actions, exception_class,
-                                  ue_header, context);
+
+  __typeof (libgcc_s_personality) personality = libgcc_s_personality;
+  PTR_DEMANGLE (personality);
+
+  return (*personality) (version, actions, exception_class, ue_header, context);
 }