< prev index next >

src/os/aix/vm/vmError_aix.cpp

Print this page
rev 7752 : 8065895: Synchronous signals during error reporting may terminate or hang VM process
Contributed-by: stuefe
Reviewed-by: dholmes

@@ -78,36 +78,41 @@
                               ? CAST_FROM_FN_PTR(address, sa.sa_sigaction)
                               : CAST_FROM_FN_PTR(address, sa.sa_handler);
 }
 
 int VMError::get_resetted_sigflags(int sig) {
-  // Handle all program errors.
   for (int i = 0; i < NUM_SIGNALS; i++) {
     if (SIGNALS[i] == sig) {
       return resettedSigflags[i];
     }
   }
   return -1;
 }
 
 address VMError::get_resetted_sighandler(int sig) {
-  // Handle all program errors.
   for (int i = 0; i < NUM_SIGNALS; i++) {
     if (SIGNALS[i] == sig) {
       return resettedSighandler[i];
     }
   }
   return NULL;
 }
 
 static void crash_handler(int sig, siginfo_t* info, void* ucVoid) {
+
   // Unmask current signal.
   sigset_t newset;
   sigemptyset(&newset);
   sigaddset(&newset, sig);
+  // and all other synchronous signals too.
+  for (int i = 0; i < NUM_SIGNALS; i++) {
+    sigaddset(&newset, SIGNALS[i]);
+  }
+  sigthreadmask(SIG_UNBLOCK, &newset, NULL);
 
-  Unimplemented();
+  VMError err(NULL, sig, NULL, info, ucVoid);
+  err.report_and_die();
 }
 
 void VMError::reset_signal_handlers() {
   sigset_t newset;
   sigemptyset(&newset);
< prev index next >