RFR: 8359646: C1 crash in AOTCodeAddressTable::add_C_string
Vladimir Kozlov
kvn at openjdk.org
Tue Jun 17 02:41:44 UTC 2025
It is concurrency issue. Call to `AOTCodeAddressTable::add_C_string()` happened after checks that AOT code cache is still opened. But, because there is no synchronization, other thread (VM) closed/delete AOT code cache (after dumping) before code in `add_C_string()` accessed it.
Added missed AOTCodeCStrings_lock in places where we modify, store and delete AOT strings table. Moved MutexLocker from `AOTCodeAddressTable::add_C_string()` to its caller and do additional check after it.
I also noticed that we missed similar check after Compile_lock when we are storing AOT code.
Tested hs-tier1-6,hs-tier10-rt,stress,xcomp
-------------
Commit messages:
- 8359646: C1 crash in AOTCodeAddressTable::add_C_string
Changes: https://git.openjdk.org/jdk/pull/25841/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25841&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8359646
Stats: 15 lines in 1 file changed: 9 ins; 4 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/25841.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25841/head:pull/25841
PR: https://git.openjdk.org/jdk/pull/25841
More information about the hotspot-compiler-dev
mailing list