[jdk21u-dev] Integrated: 8327036: [macosx-aarch64] SIGBUS in MarkActivationClosure::do_code_blob reached from Unsafe_CopySwapMemory0
Richard Reingruber
rrich at openjdk.org
Wed Mar 6 09:07:52 UTC 2024
On Thu, 29 Feb 2024 14:49:21 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
> This changes `JVM_ENTRY_FROM_LEAF` to switch to `WXWrite` before transitioning to the vm.
> This is needed on macos/aarch64 because there it is an [invariant of vm coding](https://github.com/openjdk/jdk/blob/0583f7357480c0500daa82f490b2fcc05f2fb65a/src/hotspot/share/runtime/interfaceSupport.inline.hpp#L253-L259) that a thread is in `WXWrite` mode.
>
> Without we can get similar crashes as described in the bug report when writing to the code cache.
> Note that in jdk21 we cannot get the very same crash because the nmethod sweeper was removed in jdk20 with [JDK-8290025](https://bugs.openjdk.org/browse/JDK-8290025).
>
> Also `test/jdk/sun/nio/cs/FindDecoderBugs.java` fails with an assertion if the vm option `-XX:+AssertWXAtThreadSync` is set.
>
> Testing:
> `test/jdk/sun/nio/cs/FindDecoderBugs.java` with `-XX:+AssertWXAtThreadSync`
>
> The fix passed our CI testing: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. JCK, SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests (also with ParallelGC).
> Testing was done with fastdebug builds on the main platforms and also on Linux/PPC64le.
This pull request has now been integrated.
Changeset: ad1d3248
Author: Richard Reingruber <rrich at openjdk.org>
URL: https://git.openjdk.org/jdk21u-dev/commit/ad1d32484a8130c9b641cff38c07e8544b3fd271
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
8327036: [macosx-aarch64] SIGBUS in MarkActivationClosure::do_code_blob reached from Unsafe_CopySwapMemory0
Reviewed-by: mdoerr
-------------
PR: https://git.openjdk.org/jdk21u-dev/pull/305
More information about the jdk-updates-dev
mailing list