RFR: 8348322: AOT cache creation crashes with "All cached hidden classes must be aot-linkable" when AOTInvokeDynamicLinking is disabled [v2]

Calvin Cheung ccheung at openjdk.org
Fri Feb 28 23:04:38 UTC 2025


> This changeset fixes a crash during AOT cache creation when `AOTInvokeDynamicLinking` is disabled.
> Changes in `cdsHeapVerifier.cpp` is required to avoid error such as the following during AOT cache creation:
> 
> 
> [4.156s][warning][cds,heap] Archive heap points to a static field that may hold a different value at runtime:
> [4.156s][warning][cds,heap] Field: java/util/Collections::EMPTY_LIST
> 
> Per Ioi's suggestions, added the `CDSConfig::is_dumping_method_handles()` so that most of the calls to `CDSConfig::is_dumping_aot_linked_classes()` and `CDSConfig::is_dumping_invokedynamic()` could be replaced with the new function.
> 
> Passed tiers 1 - 3 testing.

Calvin Cheung has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - @matias9927 comments
 - Merge branch 'master' into 8348322-AOT-cache-InvokeDynamicLinking
 - @iklam comments
 - Ioi's suggestions
 - 8348322: AOT cache creation crashes with "All cached hidden classes must be aot-linkable" when AOTInvokeDynamicLinking is disabled

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/23546/files
  - new: https://git.openjdk.org/jdk/pull/23546/files/b108cbc2..c41728cc

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23546&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23546&range=00-01

  Stats: 36901 lines in 1360 files changed: 20426 ins; 10832 del; 5643 mod
  Patch: https://git.openjdk.org/jdk/pull/23546.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23546/head:pull/23546

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


More information about the hotspot-runtime-dev mailing list