Integrated: 8265292: [macos_aarch64] java/foreign/TestDowncall.java crashes with SIGBUS
Anton Kozlov
akozlov at openjdk.java.net
Tue May 18 18:58:30 UTC 2021
On Fri, 7 May 2021 15:38:24 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
> Please review a fix for the intermittent crash. It is caused by a mistake in the ProgrammableInvoker::invoke_native, the wrong order of W^X and JavaThread state transition. We need WXExec since we are about to call a generated stub. But we need to switch to WXExec only after JavaThread state change. The thread state change may trigger a safepoint, that would need to do bookkeeping in the codecache (MarkActivationClosure::do_code_blob from the bug). So the fix is to change JavaThread state first, then change WX.
>
> The fix was verified with the help of https://bugs.openjdk.java.net/browse/JDK-8266742. The new check catches all test failures reported by 8265292, 8265183, 8265182. I've verified tests pass after the fix with that new check enabled.
This pull request has now been integrated.
Changeset: b92c5a44
Author: Anton Kozlov <akozlov at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/b92c5a44f268c3a866fa6bc6f6218abc0457e689
Stats: 16 lines in 3 files changed: 12 ins; 4 del; 0 mod
8265292: [macos_aarch64] java/foreign/TestDowncall.java crashes with SIGBUS
8265183: [macos_aarch64] java/foreign/TestIntrinsics.java crashes with SIGBUS
8265182: [macos_aarch64] java/foreign/TestUpcall.java crashes with SIGBUS
Reviewed-by: dholmes
-------------
PR: https://git.openjdk.java.net/jdk/pull/3921
More information about the hotspot-dev
mailing list