RFR: 8293816: CI: ciBytecodeStream::get_klass() is not consistent

Vladimir Ivanov vlivanov at openjdk.org
Thu Sep 15 20:35:26 UTC 2022


CI responses should be consistent during a single compilation.

[JDK-8293044](https://bugs.openjdk.org/browse/JDK-8293044) was fixed by turning inaccessible classes into unloaded ones when resolving them through CI.

But there's another case when `ciEnv::get_klass_by_index()` returns a loaded ciKlass while setting `will_link` to `false`: a not-yet-resolved klass revealed through a class loader constraint.

In such case, after a concurrent class loading CI will start reporting a loaded ciKlass instance. Such inconsistency may trigger some paradoxical situations during compilation.   

The fix is to instantiate a proper instance of an unloaded ciKlass, so further requests will return the unloaded instances as well.

Testing: hs-tier1 - hs-tier4

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/10294/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10294&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293816
  Stats: 10 lines in 3 files changed: 1 ins; 6 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/10294.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10294/head:pull/10294

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


More information about the hotspot-compiler-dev mailing list