RFR: 8327885: runtime/Unsafe/InternalErrorTest.java enters endless loop on Alpine aarch64

David Holmes dholmes at openjdk.org
Wed Apr 24 09:56:29 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.

As a fix for MUSL_LIBC only this is fine. Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18262#pullrequestreview-2019425221


More information about the hotspot-dev mailing list