This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.16-ports-merge-44-g07cbfc2
- From: tschwinge at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 17 Jul 2012 08:07:28 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.16-ports-merge-44-g07cbfc2
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 07cbfc23683827c1b92d0bc62b15a77a48b09a17 (commit)
via f7db31703ab2e11b162d4e0e3b4af0c1c971b6cd (commit)
via dc97c227c95dd521594f1eaa472399b9fba03b2a (commit)
from aaf5420c6d1d2f0135a89d08f22200f0dc0777bd (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=07cbfc23683827c1b92d0bc62b15a77a48b09a17
commit 07cbfc23683827c1b92d0bc62b15a77a48b09a17
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue Jul 17 10:06:06 2012 +0200
SH: makecontext: exit (0) if uc_link is the null pointer.
diff --git a/ChangeLog b/ChangeLog
index 9c2930f..751b596 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-07-17 Thomas Schwinge <thomas@codesourcery.com>
+ * sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Preserve
+ zero value for regular exit case.
+
* sysdeps/unix/sysv/linux/x86_64/__start_context.S
(__start_context): Preserve zero value for regular exit case.
diff --git a/sysdeps/unix/sysv/linux/sh/makecontext.S b/sysdeps/unix/sysv/linux/sh/makecontext.S
index a04bc9f..73fca8b 100644
--- a/sysdeps/unix/sysv/linux/sh/makecontext.S
+++ b/sysdeps/unix/sysv/linux/sh/makecontext.S
@@ -128,6 +128,7 @@ ENTRY(__makecontext)
cfi_restore (pr)
/* If this returns (which can happen if the syscall fails) we'll exit
the program with the return error value (-1). */
+ mov r0, r4
2:
mov.l .Lexit, r1
@@ -135,7 +136,7 @@ ENTRY(__makecontext)
add r12, r1
#endif
jsr @r1
- mov r0, r4
+ nop
/* The 'exit' call should never return. In case it does cause the
process to terminate. */
ABORT_INSTRUCTION_ASM
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7db31703ab2e11b162d4e0e3b4af0c1c971b6cd
commit f7db31703ab2e11b162d4e0e3b4af0c1c971b6cd
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue Jul 17 10:06:02 2012 +0200
x86_64: makecontext: exit (0) if uc_link is the null pointer.
diff --git a/ChangeLog b/ChangeLog
index fce4617..9c2930f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
2012-07-17 Thomas Schwinge <thomas@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/__start_context.S
+ (__start_context): Preserve zero value for regular exit case.
+
+2012-07-17 Thomas Schwinge <thomas@codesourcery.com>
Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* manual/setjmp.texi (setcontext): Clarify normal process
diff --git a/sysdeps/unix/sysv/linux/x86_64/__start_context.S b/sysdeps/unix/sysv/linux/x86_64/__start_context.S
index 77d322e..9f2ee23 100644
--- a/sysdeps/unix/sysv/linux/x86_64/__start_context.S
+++ b/sysdeps/unix/sysv/linux/x86_64/__start_context.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2002.
@@ -39,8 +39,9 @@ ENTRY(__start_context)
call JUMPTARGET(__setcontext)
/* If this returns (which can happen if the syscall fails) we'll
exit the program with the return error value (-1). */
+ movq %rax,%rdi
-2: movq %rax,%rdi
+2:
call HIDDEN_JUMPTARGET(exit)
/* The 'exit' call should never return. In case it does cause
the process to terminate. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc97c227c95dd521594f1eaa472399b9fba03b2a
commit dc97c227c95dd521594f1eaa472399b9fba03b2a
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue Jul 17 10:05:55 2012 +0200
setcontext: Clarify termination when uc_link is the null pointer.
diff --git a/ChangeLog b/ChangeLog
index f6c1cc5..fce4617 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-17 Thomas Schwinge <thomas@codesourcery.com>
+ Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * manual/setjmp.texi (setcontext): Clarify normal process
+ termination when uc_link is the null pointer.
+ * stdlib/tst-makecontext.c (cf): Exercise this: remove explicit
+ exit call.
+
2012-07-16 Andreas Schwab <schwab@linux-m68k.org>
* stdlib/bug-getcontext.c (do_test): Don't test FE_ALL_EXCEPT in
diff --git a/manual/setjmp.texi b/manual/setjmp.texi
index a5a7ce6..f13ac7b 100644
--- a/manual/setjmp.texi
+++ b/manual/setjmp.texi
@@ -354,7 +354,8 @@ specified parameters passed. If this function returns execution is
resumed in the context which was referenced by the @code{uc_link}
element of the context structure passed to @code{makecontext} at the
time of the call. If @code{uc_link} was a null pointer the application
-terminates in this case.
+terminates normally with an exit status value of @code{EXIT_SUCCESS}
+(@pxref{Program Termination}).
Since the context contains information about the stack no two threads
should use the same context at the same time. The result in most cases
diff --git a/stdlib/tst-makecontext.c b/stdlib/tst-makecontext.c
index 3185900..eb6e89b 100644
--- a/stdlib/tst-makecontext.c
+++ b/stdlib/tst-makecontext.c
@@ -35,7 +35,9 @@ cf (int i)
printf ("i %d thr %d\n", i, thr);
exit (1);
}
- exit (0);
+
+ /* Since uc_link below has been set to NULL, setcontext is supposed to
+ terminate the process normally after this function returns. */
}
int
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 16 ++++++++++++++++
manual/setjmp.texi | 3 ++-
stdlib/tst-makecontext.c | 4 +++-
sysdeps/unix/sysv/linux/sh/makecontext.S | 3 ++-
sysdeps/unix/sysv/linux/x86_64/__start_context.S | 5 +++--
5 files changed, 26 insertions(+), 5 deletions(-)
hooks/post-receive
--
GNU C Library master sources