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.16-ports-merge-592-gd6cffd3


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  d6cffd3ec0b21914424d7e6e6b4c688f3b8b3fcd (commit)
      from  b3563932f85d60bb0d38b0a5f3b8f4abc133f890 (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6cffd3ec0b21914424d7e6e6b4c688f3b8b3fcd

commit d6cffd3ec0b21914424d7e6e6b4c688f3b8b3fcd
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Thu Nov 1 20:10:39 2012 -0500

    PowerPC: Fix uc_link == NULL handling for makecontex.
    
    If the function registered with makecontext returns with a NULL context
    link the process should exit with zero, not non-zero.

diff --git a/ChangeLog b/ChangeLog
index b2f40c3..0600968 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-01  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: If the
+	function returns with a NULL context exit with zero.
+
 2012-11-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
 
 	* sysdeps/powerpc/Makefile (cflags): Remove -mnew-mnemonics.
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
index ded2a35..0939a65 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
@@ -134,26 +134,26 @@ L(noparms):
 	   'makecontext' call.  If the pointer is NULL the process must
 	   terminate.  */
 L(exitcode):
-   /* Recover the ucontext and TOC from the dummy frame.  */
-  ld    r1,FRAME_BACKCHAIN(r1)  /* Unstack the parameter save area frame.  */
-  ld    r3,FRAME_PARM1_SAVE(r1)
-  ld    r2,FRAME_TOC_SAVE(r1)
-  ld    r3,UCONTEXT_LINK(r3)  /* Load the resume context.  */
-  cmpdi r3,0
-  beq   L(BADSTATUS)
+	/* Recover the ucontext and TOC from the dummy frame.  */
+	ld    r1,FRAME_BACKCHAIN(r1)  /* Unstack the parameter save area frame.  */
+	ld    r3,FRAME_PARM1_SAVE(r1)
+	ld    r2,FRAME_TOC_SAVE(r1)
+	ld    r3,UCONTEXT_LINK(r3)  /* Load the resume context.  */
+	cmpdi r3,0
+	beq   L(do_exit)
 	bl    JUMPTARGET(__setcontext)
 	nop
-
-L(BADSTATUS):
-/* If setcontext returns (which can happen if the syscall fails) we will
-   exit the program with error status (-1).  */
-  li    r3,-1
+	/* If setcontext returns (which can happen if the syscall fails) we will
+	   exit the program with error status (-1).  */
+	li    r3,-1
+L(do_exit):
 #ifdef SHARED
-  b     JUMPTARGET(__GI_exit);
+	b     JUMPTARGET(__GI_exit);
 #else
-  b     JUMPTARGET(exit);
-  nop
+	b     JUMPTARGET(exit);
+	nop
 #endif
+	b    L(do_exit)
 
   /* The address of the exit code is in the link register.  Store the lr
      in the ucontext as LNK so the target function will return to our

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

Summary of changes:
 ChangeLog                                          |    5 +++
 .../sysv/linux/powerpc/powerpc64/makecontext.S     |   30 ++++++++++----------
 2 files changed, 20 insertions(+), 15 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]