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

Vladimir Kempik vkempik at openjdk.java.net
Thu Mar 3 14:45:07 UTC 2022


On Thu, 3 Mar 2022 13:41:36 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

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

Marked as reviewed by vkempik (Reviewer).

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

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


More information about the jdk-updates-dev mailing list