RFR: 8327885: runtime/Unsafe/InternalErrorTest.java enters endless loop on Alpine aarch64
Dean Long
dlong at openjdk.org
Thu Apr 25 08:34:28 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.
Good point. Making the use of stub routines mandatory seems like the best solution, and removes a runtime check in Unsafe_SetMemory0.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18262#issuecomment-2076654055
More information about the hotspot-dev
mailing list