From 3d511ff63e59f542ae20c722bfef1c867cd1da0e Mon Sep 17 00:00:00 2001 From: Tobias Holenstein Date: Wed, 22 May 2024 08:50:15 +0000 Subject: [PATCH] 8329748: Change default value of AssertWXAtThreadSync to true Reviewed-by: kvn, rrich --- src/hotspot/os/bsd/globals_bsd.hpp | 2 +- src/hotspot/share/jfr/support/jfrIntrinsics.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hotspot/os/bsd/globals_bsd.hpp b/src/hotspot/os/bsd/globals_bsd.hpp index 66fae6a49d2..850d491a11f 100644 --- a/src/hotspot/os/bsd/globals_bsd.hpp +++ b/src/hotspot/os/bsd/globals_bsd.hpp @@ -35,7 +35,7 @@ range, \ constraint) \ \ - AARCH64_ONLY(develop(bool, AssertWXAtThreadSync, false, \ + AARCH64_ONLY(develop(bool, AssertWXAtThreadSync, true, \ "Conservatively check W^X thread state at possible safepoint" \ "or handshake")) diff --git a/src/hotspot/share/jfr/support/jfrIntrinsics.cpp b/src/hotspot/share/jfr/support/jfrIntrinsics.cpp index 4b7c6c8aee9..63d0e686021 100644 --- a/src/hotspot/share/jfr/support/jfrIntrinsics.cpp +++ b/src/hotspot/share/jfr/support/jfrIntrinsics.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,6 +74,7 @@ void* JfrIntrinsicSupport::write_checkpoint(JavaThread* jt) { void* JfrIntrinsicSupport::return_lease(JavaThread* jt) { DEBUG_ONLY(assert_precondition(jt);) + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, jt)); ThreadStateTransition::transition_from_java(jt, _thread_in_native); assert(jt->jfr_thread_local()->has_java_event_writer(), "invariant"); assert(jt->jfr_thread_local()->shelved_buffer() != nullptr, "invariant");