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.15-1206-g967705f


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  967705fee12b4c02456fedbeb4c0dc6e79469ca7 (commit)
      from  a9def8c49d22815801408e62bedca26810cfceb7 (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=967705fee12b4c02456fedbeb4c0dc6e79469ca7

commit 967705fee12b4c02456fedbeb4c0dc6e79469ca7
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Sat Jun 23 11:47:39 2012 +0200

    SH: ABORT_INSTRUCTION.

diff --git a/ChangeLog b/ChangeLog
index 751797d..1ec2e00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* sysdeps/sh/abort-instr.h: New file.
+	* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Terminate the
+	process in case exit returns.
+
 	* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Always
 	initialize the GOT register before use.
 
diff --git a/sysdeps/sh/abort-instr.h b/sysdeps/sh/abort-instr.h
new file mode 100644
index 0000000..69381ae
--- /dev/null
+++ b/sysdeps/sh/abort-instr.h
@@ -0,0 +1,3 @@
+/* An instruction which should crash any program is `sleep'.  */
+#define ABORT_INSTRUCTION_ASM sleep
+#define ABORT_INSTRUCTION asm ("sleep")
diff --git a/sysdeps/unix/sysv/linux/sh/makecontext.S b/sysdeps/unix/sysv/linux/sh/makecontext.S
index a847bb6..ec9ce91 100644
--- a/sysdeps/unix/sysv/linux/sh/makecontext.S
+++ b/sysdeps/unix/sysv/linux/sh/makecontext.S
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <abort-instr.h>
 
 #include "ucontext_i.h"
 
@@ -124,9 +125,9 @@ ENTRY(__makecontext)
 #endif
 	jsr	@r1
 	 mov	r0, r4
-0:
-	bra	0b
-	 nop
+	/* The 'exit' call should never return.  In case it does cause the
+	   process to terminate.  */
+	ABORT_INSTRUCTION_ASM
 
 	.align	2
 #ifdef PIC

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

Summary of changes:
 ChangeLog                                |    4 ++++
 sysdeps/sh/abort-instr.h                 |    3 +++
 sysdeps/unix/sysv/linux/sh/makecontext.S |    7 ++++---
 3 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 sysdeps/sh/abort-instr.h


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]