[kaffe] CVS kaffe (robilad): fix stack overflow detection to handle sigbus
Kaffe CVS
cvs-commits at kaffe.org
Wed Jan 16 18:04:05 PST 2008
PatchSet 7681
Date: 2008/01/17 01:59:08
Author: robilad
Branch: HEAD
Tag: (none)
Log:
fix stack overflow detection to handle sigbus
2008-01-17 Doug Young <doug at morphlix.com>
* kaffe/kaffevm/systems/unix-pthreads/signal.c (stackOverflowDetector),
kaffe/kaffevm/systems/unix-jthreads/signal.c (stackOverflowDetector):
The sig argument should be used to clear the signal, since it could
be either SIGSEGV or SIGBUS.
Members:
ChangeLog:1.5183->1.5184
kaffe/kaffevm/systems/unix-jthreads/signal.c:1.34->1.35
kaffe/kaffevm/systems/unix-pthreads/signal.c:1.30->1.31
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5183 kaffe/ChangeLog:1.5184
--- kaffe/ChangeLog:1.5183 Wed Jan 16 23:10:06 2008
+++ kaffe/ChangeLog Thu Jan 17 01:59:08 2008
@@ -1,3 +1,10 @@
+2008-01-17 Doug Young <doug at morphlix.com>
+
+ * kaffe/kaffevm/systems/unix-pthreads/signal.c (stackOverflowDetector),
+ kaffe/kaffevm/systems/unix-jthreads/signal.c (stackOverflowDetector):
+ The "sig" argument should be used to clear the signal, since it could
+ be either SIGSEGV or SIGBUS.
+
2008-01-16 Dalibor Topic <robilad at kaffe.org>
* configure.ac: Only check for libgc when boehm-gc is selected as the
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.34 kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.35
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.34 Sat Jul 15 21:16:55 2006
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c Thu Jan 17 01:59:17 2008
@@ -442,9 +442,9 @@
* and then go back in detectStackBoundaries() using the old stack.
*/
static void NONRETURNING
-stackOverflowDetector(SIGNAL_ARGS(sig UNUSED, sc))
+stackOverflowDetector(SIGNAL_ARGS(sig, sc))
{
- unblockSignal(SIGSEGV);
+ unblockSignal(sig);
JTHREAD_LONGJMP(outOfLoop, 1);
}
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.30 kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.31
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.30 Sat Oct 6 11:49:26 2007
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c Thu Jan 17 01:59:17 2008
@@ -431,9 +431,9 @@
* and then go back in KaffePThread_detectStackBoundaries() using the old stack.
*/
static void NONRETURNING
-stackOverflowDetector(SIGNAL_ARGS(sig UNUSED, sc))
+stackOverflowDetector(SIGNAL_ARGS(sig, sc))
{
- unblockSignal(SIGSEGV);
+ unblockSignal(sig);
JTHREAD_LONGJMP(outOfLoop, 1);
}
More information about the kaffe
mailing list