RFR: JDK-8296906: VMError::controlled_crash crashes with wrong code and address [v4]

Thomas Stuefe stuefe at openjdk.org
Wed Nov 16 08:50:10 UTC 2022


> 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.

Thomas Stuefe has updated the pull request incrementally with two additional commits since the last revision:

 - Remove trailing whitespace
   
   Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
 - blessed modifiers
   
   Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/11122/files
  - new: https://git.openjdk.org/jdk/pull/11122/files/a931ea8b..a72d834a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11122&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11122&range=02-03

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/11122.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11122/head:pull/11122

PR: https://git.openjdk.org/jdk/pull/11122


More information about the hotspot-dev mailing list