< prev index next >

src/share/vm/utilities/debug.cpp

Print this page

        

@@ -329,11 +329,13 @@
   // if that did not cause a signal (e.g. on ppc), just
   // raise the signal.
   volatile int x = 0;
   volatile int y = 1/x;
 #ifndef _WIN32
-  raise(SIGFPE);
+  // OSX implements raise(sig) incorrectly so we need to
+  // explicitly target the current thread
+  pthread_kill(pthread_self(), SIGFPE);
 #endif
 } // end: crash_with_sigfpe
 
 // crash with sigsegv at non-null address.
 static void crash_with_segfault() {
< prev index next >