# HG changeset patch # User stuefe # Date 1490102046 -3600 # Node ID b5fc11000e66d2e6627fa4e2c545b163943fdcf9 # Parent 03f4b62f356202de77eefb91ce9d1ae9b0e61982 8176872: [s390] wrong pc shown in error logs Reviewed-by: diff --git a/src/os_cpu/linux_s390/vm/os_linux_s390.cpp b/src/os_cpu/linux_s390/vm/os_linux_s390.cpp --- a/src/os_cpu/linux_s390/vm/os_linux_s390.cpp +++ b/src/os_cpu/linux_s390/vm/os_linux_s390.cpp @@ -505,6 +505,14 @@ 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();