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.18-61-g6c8bbad


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  6c8bbad92726eeb50c9bb4107dad80155062eb0a (commit)
      from  18d4371683fbe347bf4fbaef05d18b5a4918887a (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=6c8bbad92726eeb50c9bb4107dad80155062eb0a

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/NEWS b/NEWS
index 17e8eb6..7ac718f 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ Version 2.19
 * The following bugs are resolved with this release:
 
   14155, 14699, 15522, 15531, 15532, 15736, 15749, 15797, 15867, 15890,
-  15897, 15905, 15909.
+  15897, 15905, 15909, 15921.
 
 * CVE-2013-4237 The readdir_r function could write more than NAME_MAX bytes
   to the d_name member of struct dirent, or omit the terminating NUL
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index d1efbb4..7511f70 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-03  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	[BZ #15921]
+	* tst-cleanup2.c (do_test): New volatile variable RET to
+	return success.
+
 2013-08-30   OndÅ?ej Bílka  <neleai@seznam.cz>
 
 	* sysdeps/pthread/pthread.h: Fix typos.
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");

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

Summary of changes:
 NEWS                |    2 +-
 nptl/ChangeLog      |    6 ++++++
 nptl/tst-cleanup2.c |    8 +++++++-
 3 files changed, 14 insertions(+), 2 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]