[kaffe] CVS kaffe (guilhem): Removed setupSigAltStack from unix-pthreads.

Kaffe CVS cvs-commits at kaffe.org
Fri Jul 30 09:08:42 PDT 2004


PatchSet 5031 
Date: 2004/07/30 15:01:37
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Removed setupSigAltStack from unix-pthreads.

        * kaffe/kaffevm/systems/unix-pthreads/signal.c
        (setupSigAltStack, detectStackBoundaries): Removed setupSigAltStack
        for unix-pthreads as its use is unsafe on most architectures.

Members: 
	ChangeLog:1.2589->1.2590 
	kaffe/kaffevm/systems/unix-pthreads/signal.c:1.11->1.12 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2589 kaffe/ChangeLog:1.2590
--- kaffe/ChangeLog:1.2589	Fri Jul 30 13:57:47 2004
+++ kaffe/ChangeLog	Fri Jul 30 15:01:37 2004
@@ -5,6 +5,12 @@
 
 2004-07-30  Guilhem Lavaux <guilhem at kaffe.org>
 
+	* kaffe/kaffevm/systems/unix-pthreads/signal.c
+	(setupSigAltStack, detectStackBoundaries): Removed setupSigAltStack
+	for unix-pthreads as its use is unsafe on most architectures.
+
+2004-07-30  Guilhem Lavaux <guilhem at kaffe.org>
+
 	* libraries/java/lang/Thread.java: Reverted to original file from
 	GNU Classpath.
 
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.11 kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.12
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.11	Sun Jul 11 17:44:55 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c	Fri Jul 30 15:02:01 2004
@@ -340,33 +340,6 @@
 	
 }
 
-#if defined(HAVE_SIGALTSTACK) && defined(SA_ONSTACK)
-static void
-setupSigAltStack(void)
-{
-        STACK_STRUCT newstack;
-
-	/*
-	 * Signals has to have their own stack so we can solve
-	 * stack problems.
-	 */
-	newstack.ss_size = THREADSTACKSIZE;
-	newstack.ss_flags = 0;
-	newstack.ss_sp = KMALLOC(newstack.ss_size);
-	if (sigaltstack(&newstack, NULL) < 0)
-	  {
-	    dprintf("Unexpected error calling sigaltstack: %s\n",
-		    SYS_ERROR(errno));
-	    EXIT(1);
-	  }
-}
-#else
-static void
-setupSigAltStack(void)
-{
-}
-#endif
-
 /* ----------------------------------------------------------------------
  * STACK BOUNDARY DETECTORS
  * ----------------------------------------------------------------------
@@ -385,8 +358,6 @@
 
 	stackPointer = mdGetStackBase();
 
-	setupSigAltStack();
-
 	jtid->stackMin = stackPointer;
 	jtid->stackMax = (char *)jtid->stackMin + mainThreadStackSize;
         jtid->stackCur = jtid->stackMax;
@@ -404,8 +375,6 @@
 {
         void *stackPointer;
 
-	setupSigAltStack();
-
 	stackPointer = mdGetStackEnd();
 
 	jtid->stackMax = stackPointer;
@@ -443,8 +412,6 @@
 {
 	static volatile char *guessPointer;
 	void *handler_segv, *handler_bus;
-
-	setupSigAltStack();
 
 #if defined(SIGSEGV)
 	handler_segv = registerSyncSignalHandler(SIGSEGV, stackOverflowDetector);




More information about the kaffe mailing list