RFR: 8327885: runtime/Unsafe/InternalErrorTest.java enters endless loop on Alpine aarch64
Dean Long
dlong at openjdk.org
Wed Apr 24 20:11:30 UTC 2024
On Wed, 13 Mar 2024 07:34:11 GMT, Dmitry Cherepanov <dcherepanov at openjdk.org> wrote:
> [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.
Why not detect `strb` with auto-increment in the signal handler and do the increment there?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18262#issuecomment-2075753004
More information about the hotspot-dev
mailing list