[jdk11u-dev] RFR: JDK-8282589: runtime/ErrorHandling/ErrorHandler.java fails on MacOS aarch64 in jdk 11 [v2]

Thomas Stuefe stuefe at openjdk.java.net
Thu Mar 3 13:41:36 UTC 2022


> In JDK 11 only, we see errors in runtime/ErrorHandling/ErrorHandler.java. The test induces an artificial (but real) segfault and checks the VMs reaction to it (that the hs-err file is written correctly and contains expected output).
> 
> The test does this by reading from `char* p = NULL;`. This is not guaranteed to work, and does not in this case: the process gets a "BPT/Trap" message instead and dies.
> 
> This code (`VMError::controlled_crash()`) has been streamlined and rewritten for later releases, and there we consistently use a known non-null address to invalid memory instead, which seems to work reliably for MacOs aarch64 too.
> 
> ---
> 
> The patch, instead of downporting the whole reworkings of `VMError::controlled_crash`, just reuses the code which checks a segfault against a non-null invalid address. That way we do the same as newer releases, but with minimal changes.

Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:

  Re-enable runtime/ErrorHandling/TestOnError.java on MacOS aarch64

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

Changes:
  - all: https://git.openjdk.java.net/jdk11u-dev/pull/842/files
  - new: https://git.openjdk.java.net/jdk11u-dev/pull/842/files/40fdc398..5883b481

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=842&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=842&range=00-01

  Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk11u-dev/pull/842.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/842/head:pull/842

PR: https://git.openjdk.java.net/jdk11u-dev/pull/842


More information about the jdk-updates-dev mailing list