RFR: 8327885: runtime/Unsafe/InternalErrorTest.java enters endless loop on Alpine aarch64
Dmitry Cherepanov
dcherepanov at openjdk.org
Wed Mar 13 07:38:18 UTC 2024
[JDK-8322163](https://bugs.openjdk.org/browse/JDK-8322163) replaced memset with a for loop on Alpine. This fixed the test on Alpine x86_64 but it enters endless loop on Alpine aarch64.
The loop causes SIGBUS to be generated and the signal handler continues to the next instruction. As gcc generates strb with auto-increment on aarch64, the increment will be skipped.
The patch makes the counter volatile to prevent compilers from generating strb with auto-increment. With the patch, the test passes on Alpine aarch64.
-------------
Commit messages:
- 8327885: runtime/Unsafe/InternalErrorTest.java enters endless loop on Alpine aarch64
Changes: https://git.openjdk.org/jdk/pull/18262/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18262&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8327885
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/18262.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18262/head:pull/18262
PR: https://git.openjdk.org/jdk/pull/18262
More information about the hotspot-dev
mailing list