Integrated: JDK-8316392: compiler/interpreter/TestVerifyStackAfterDeopt.java failed with SIGBUS in PcDescContainer::find_pc_desc_internal

Tobias Holenstein tholenstein at openjdk.org
Tue Nov 14 16:20:42 UTC 2023


On Mon, 23 Oct 2023 11:43:52 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:

> In `PcDescContainer::find_pc_desc_internal` we call `_pc_desc_cache.add_pc_desc(upper)`.  `PcDescCache::add_pc_desc` writes to the PcDescCache which requires to have the `WXWrite` lock on `MACOS_AARCH64`. Since the lock is now directly in `PcDescCache::add_pc_desc` we can remove it from `nmethod::decode2`, which calls can write to a PcDescCache.
> 
> (I'm working on a more complete fix for WXWrite to hopefully finally end this whack-a-mole)
> 
> Testing passed. 
> 
> 
> ### Side note about WXWrite
> 
> On Apple Silicon the Writer/Execute lock is a new Hardened Runtime capability, see:
> https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon
> 
> It prevents memory regions to be writable and executable at the same time. Therefore, we need to acquire WXWrite when we want to write to the code cache.

This pull request has now been integrated.

Changeset: 58af9aee
Author:    Tobias Holenstein <tholenstein at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/58af9aeeb07b7a392a8fbf04ef5cb2607b7b2462
Stats:     7 lines in 2 files changed: 1 ins; 5 del; 1 mod

8316392: compiler/interpreter/TestVerifyStackAfterDeopt.java failed with SIGBUS in PcDescContainer::find_pc_desc_internal

Reviewed-by: thartmann, kvn

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

PR: https://git.openjdk.org/jdk/pull/16308


More information about the hotspot-compiler-dev mailing list