RFR: JDK-8316392: compiler/interpreter/TestVerifyStackAfterDeopt.java failed with SIGBUS in PcDescContainer::find_pc_desc_internal [v3]
Tobias Hartmann
thartmann at openjdk.org
Mon Nov 13 09:23:06 UTC 2023
On Mon, 13 Nov 2023 09:06:23 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.
>
> Tobias Holenstein has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>
> - Merge branch 'master' into JDK-8316392
> - remove compiler/interpreter/TestVerifyStackAfterDeopt.java from test/hotspot/jtreg/ProblemList-Xcomp.txt
> - simple fix
> - Revert "v1"
>
> This reverts commit 98ea2c63670cce0c41bdc2112aba30308c4e78dd.
>
> Revert "v2"
>
> This reverts commit f5e21f99a74daad7c053aacb0a9353acf0a7e766.
> - v2
> - v1
Thanks, looks good to me.
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16308#pullrequestreview-1726853605
More information about the hotspot-compiler-dev
mailing list