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

Dean Long dlong at openjdk.org
Thu Sep 15 22:12:46 UTC 2022


On Thu, 15 Sep 2022 19:58:13 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> 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

Makes sense.

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

Marked as reviewed by dlong (Reviewer).

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


More information about the hotspot-compiler-dev mailing list