< prev index next >

src/os_cpu/linux_s390/vm/os_linux_s390.cpp

Print this page
rev 12800 : 8176872: [s390] wrong pc shown in error logs
Reviewed-by: dholmes, dsamersoff

@@ -503,10 +503,18 @@
   sigset_t newset;
   sigemptyset(&newset);
   sigaddset(&newset, sig);
   sigprocmask(SIG_UNBLOCK, &newset, NULL);
 
+  // Hand down correct pc for SIGILL, SIGFPE. pc from context
+  // usually points to the instruction after the failing instruction.
+  // Note: this should be combined with the trap_pc handling above,
+  // because it handles the same issue.
+  if (sig == SIGILL || sig == SIGFPE) {
+    pc = (address) info->si_addr;
+  }
+
   VMError::report_and_die(t, sig, pc, info, ucVoid);
 
   ShouldNotReachHere();
   return false;
 }
< prev index next >