[jdk11u-dev] RFR: JDK-8282589: runtime/ErrorHandling/ErrorHandler.java fails on MacOS aarch64 in jdk 11
Thomas Stuefe
stuefe at openjdk.java.net
Thu Mar 3 08:30:28 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.
-------------
Commit messages:
- small fix
- fix
Changes: https://git.openjdk.java.net/jdk11u-dev/pull/842/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=842&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8282589
Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 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