RFR: 8358680: AOT cache creation fails: no strings should have been added [v3]
Ioi Lam
iklam at openjdk.org
Tue Jul 1 18:26:57 UTC 2025
> Background: when writing the string table in the AOT cache, we do this:
>
> 1. Find out the number of strings in the interned string table
> 2. Allocate Java object arrays that are large enough to store these strings. These arrays are used by `StringTable::lookup_shared()` in the production run.
> 3. Enter safepoint
> 4. Copy the strings into the arrays
>
> This bug happened because:
>
> - Step 1 is not thread safe, so it may be reading a stale version of `_items_count`
> - JIT compiler threads may create more interned strings after step 1
>
> This PR attempts to fix both issues.
Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
Use bool for _disable_interning_during_cds_dump
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25816/files
- new: https://git.openjdk.org/jdk/pull/25816/files/94a64f97..57ceaa9c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25816&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25816&range=01-02
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/25816.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25816/head:pull/25816
PR: https://git.openjdk.org/jdk/pull/25816
More information about the hotspot-dev
mailing list