[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r6649 - in glibc-package/branches/glibc-2.21/debian: . patches patches/any



Author: aurel32
Date: 2015-10-18 22:16:32 +0000 (Sun, 18 Oct 2015)
New Revision: 6649

Added:
   glibc-package/branches/glibc-2.21/debian/patches/any/cvs-mangle-tls_dtor_list.diff
Modified:
   glibc-package/branches/glibc-2.21/debian/changelog
   glibc-package/branches/glibc-2.21/debian/patches/series
Log:
patches/any/cvs-mangle-tls_dtor_list.diff: new patch from upstream to
mangle function pointers in tls_dtor_list.  Closes: #802256.

Modified: glibc-package/branches/glibc-2.21/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.21/debian/changelog	2015-10-18 21:08:35 UTC (rev 6648)
+++ glibc-package/branches/glibc-2.21/debian/changelog	2015-10-18 22:16:32 UTC (rev 6649)
@@ -68,6 +68,8 @@
     kernels.  Closes: #800846.
   * patches/any/cvs-ld_pointer_guard.diff: new patch from upstream to
     unconditionally disable LD_POINTER_GUARD.  Closes: #798316, #801691.
+  * patches/any/cvs-mangle-tls_dtor_list.diff: new patch from upstream to
+    mangle function pointers in tls_dtor_list.  Closes: #802256.
 
   [ Steven Chamberlain ]
   * sysdeps/kfreebsd.mk: find kfreebsd-kernel-headers in multiarch path.

Added: glibc-package/branches/glibc-2.21/debian/patches/any/cvs-mangle-tls_dtor_list.diff
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/any/cvs-mangle-tls_dtor_list.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.21/debian/patches/any/cvs-mangle-tls_dtor_list.diff	2015-10-18 22:16:32 UTC (rev 6649)
@@ -0,0 +1,35 @@
+2015-10-06  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #19018]
+	* stdlib/cxa_thread_atexit_impl.c (__cxa_thread_atexit_impl):
+	Mangle function pointer before storing it.
+	(__call_tls_dtors): Demangle function pointer before calling it.
+
+--- a/stdlib/cxa_thread_atexit_impl.c
++++ b/stdlib/cxa_thread_atexit_impl.c
+@@ -42,6 +42,10 @@
+ int
+ __cxa_thread_atexit_impl (dtor_func func, void *obj, void *dso_symbol)
+ {
++#ifdef PTR_MANGLE
++  PTR_MANGLE (func);
++#endif
++
+   /* Prepend.  */
+   struct dtor_list *new = calloc (1, sizeof (struct dtor_list));
+   new->func = func;
+@@ -83,9 +87,13 @@
+   while (tls_dtor_list)
+     {
+       struct dtor_list *cur = tls_dtor_list;
++      dtor_func func = cur->func;
++#ifdef PTR_DEMANGLE
++      PTR_DEMANGLE (func);
++#endif
+       tls_dtor_list = tls_dtor_list->next;
+ 
+-      cur->func (cur->obj);
++      func (cur->obj);
+ 
+       __rtld_lock_lock_recursive (GL(dl_load_lock));
+ 

Modified: glibc-package/branches/glibc-2.21/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/series	2015-10-18 21:08:35 UTC (rev 6648)
+++ glibc-package/branches/glibc-2.21/debian/patches/series	2015-10-18 22:16:32 UTC (rev 6649)
@@ -268,3 +268,4 @@
 any/cvs-logbl-accuracy.diff
 any/local-math-logb.diff
 any/cvs-ld_pointer_guard.diff
+any/cvs-mangle-tls_dtor_list.diff


Reply to: