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

r5784 - in glibc-package/branches/eglibc-2.18/debian: . patches patches/any



Author: adconrad
Date: 2013-11-22 17:33:17 +0000 (Fri, 22 Nov 2013)
New Revision: 5784

Added:
   glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-tst-cleanup2-ret.diff
Modified:
   glibc-package/branches/eglibc-2.18/debian/changelog
   glibc-package/branches/eglibc-2.18/debian/patches/series
Log:
debian/patches/any/cvs-tst-cleanup2-ret.diff: Fix return regression
on recent versions of gcc in nptl/tst-cleanup2 and nptl/tst-cleanupx2.

Modified: glibc-package/branches/eglibc-2.18/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/changelog	2013-11-22 12:49:50 UTC (rev 5783)
+++ glibc-package/branches/eglibc-2.18/debian/changelog	2013-11-22 17:33:17 UTC (rev 5784)
@@ -62,6 +62,8 @@
   * debian/libc6.symbols.ppc64: Add missing libc6 symbols file for ppc64.
   * debian/libc6.symbols.arm64: Add missing libc6 symbols file for arm64.
   * debian/sysdeps/*: Enable new IFUNC support on armel and armhf builds.
+  * debian/patches/any/cvs-tst-cleanup2-ret.diff: Fix return regression
+    on recent versions of gcc in nptl/tst-cleanup2 and nptl/tst-cleanupx2.
 
   [ Samuel Thibault ]
   * patches/hurd-i386/libpthread_hurd_cond_timedwait.diff: Rebased.

Added: glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-tst-cleanup2-ret.diff
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-tst-cleanup2-ret.diff	                        (rev 0)
+++ glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-tst-cleanup2-ret.diff	2013-11-22 17:33:17 UTC (rev 5784)
@@ -0,0 +1,43 @@
+commit 6c8bbad92726eeb50c9bb4107dad80155062eb0a
+Author: Siddhesh Poyarekar <siddhesh@redhat.com>
+Date:   Tue Sep 3 09:29:01 2013 +0530
+
+    Mark success return value as volatile to work around rescheduling
+    
+    Resolves #15921
+    
+    The test case nptl/tst-cleanup2 fails on s390x and power6 due to
+    instruction sheduling in gcc.  This was reported in gcc:
+    
+    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58034
+    
+    but it was concluded that gcc is allowed to assume that the first
+    argument to sprintf is a character array - NULL not being a valid
+    character array.
+
+diff --git a/nptl/tst-cleanup2.c b/nptl/tst-cleanup2.c
+index 5bd1609..65af0f2 100644
+--- a/nptl/tst-cleanup2.c
++++ b/nptl/tst-cleanup2.c
+@@ -34,6 +34,12 @@ static int
+ do_test (void)
+ {
+   char *p = NULL;
++  /* gcc can overwrite the success written value by scheduling instructions
++     around sprintf.  It is allowed to do this since according to C99 the first
++     argument of sprintf is a character array and NULL is not a valid character
++     array.  Mark the return value as volatile so that it gets reloaded on
++     return.  */
++  volatile int ret = 0;
+   struct sigaction sa;
+ 
+   sa.sa_handler = sig_handler;
+@@ -50,7 +56,7 @@ do_test (void)
+   if (setjmp (jmpbuf))
+     {
+       puts ("Exiting main...");
+-      return 0;
++      return ret;
+     }
+ 
+   sprintf (p, "This should segv\n");

Modified: glibc-package/branches/eglibc-2.18/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/patches/series	2013-11-22 12:49:50 UTC (rev 5783)
+++ glibc-package/branches/eglibc-2.18/debian/patches/series	2013-11-22 17:33:17 UTC (rev 5784)
@@ -231,6 +231,7 @@
 any/local-tst-eintr1-eagain.diff
 any/unsubmitted-ldso-machine-mismatch.diff
 any/cvs-tst-tls-atexit-deps.diff
+any/cvs-tst-cleanup2-ret.diff
 any/cvs-CVE-2013-4332-memalign.diff
 any/cvs-CVE-2013-4332-pvalloc.diff
 any/cvs-CVE-2013-4332-valloc.diff


Reply to: