Integrated: JDK-8296906: VMError::controlled_crash crashes with wrong code and address
Thomas Stuefe
stuefe at openjdk.org
Thu Nov 17 07:11:10 UTC 2022
On Sun, 13 Nov 2022 09:01:09 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> We have VMError::controlled_crash() in debug builds, whose job is to trigger clearly defined faults to test VM error reporting. VMError::controlled_crash(14) (the numbers don't mean anything and probably should be replaced with clear enums) is to crash with a SIGSEGV + SEGV_MAPERR mapping error at a well-known crash address. But this does not work on Linux, where it generates a SIGSEGV with SI_KERNEL instead. We never noticed since it had not been used in tests so far.
>
> The reason for SI_KERNEL was that the crash address we use (0xABC0000000000ABC) was outside the user-space address range on Linux. This patch redefines the crash address to a value that really generates a SIGSEGV + SEGV_MAPERR on all our platforms. That's one line; the rest is a new regression test that checks that signal info is printed correctly in hs-err files.
This pull request has now been integrated.
Changeset: b9d6e83e
Author: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b9d6e83e9bc8c37780f6af0f6135cda72ce3c1b2
Stats: 242 lines in 3 files changed: 238 ins; 1 del; 3 mod
8296906: VMError::controlled_crash crashes with wrong code and address
Reviewed-by: dholmes, mbaesken
-------------
PR: https://git.openjdk.org/jdk/pull/11122
More information about the hotspot-dev
mailing list