changeset 3583:b237d00f078c

7129715: MAC: SIGBUS in nsk stress test Summary: StackOverflowError may get lost on OSX. Reviewed-by: kvn, dcubed
author roland
date Thu, 21 Jun 2012 09:52:38 +0200
parents 9fc5bd0e5818
children cfb193817fec
files src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Mon Jun 18 15:17:30 2012 -0700
+++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Thu Jun 21 09:52:38 2012 +0200
@@ -516,7 +516,12 @@
       }
     }
 
-    if (thread->thread_state() == _thread_in_Java) {
+    // We test if stub is already set (by the stack overflow code
+    // above) so it is not overwritten by the code that follows. This
+    // check is not required on other platforms, because on other
+    // platforms we check for SIGSEGV only or SIGBUS only, where here
+    // we have to check for both SIGSEGV and SIGBUS.
+    if (thread->thread_state() == _thread_in_Java && stub == NULL) {
       // Java thread running in Java code => find exception handler if any
       // a fault inside compiled code, the interpreter, or a stub