RFR: 8267979: C2: Fix verification code in SubTypeCheckNode::Ideal()

Roland Westrelin roland at openjdk.java.net
Tue Jun 1 07:31:27 UTC 2021


On Mon, 31 May 2021 10:11:13 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> Make verification code in `SubTypeCheckNode::Ideal()` robust in presense of concurrent class loading.
> 
> It repeatedly calls `Compile::static_subtype_check()` (directly and indirectly from `SubTypeCheckNode::sub()` through `Value()`) which can switch from `Compile::SSC_easy_test` to `Compile::SSC_full_test` as a result of concurrent class loading. As a result, it breaks the invariant being asserted.
> 
> The fix tries to catch such case by checking that `Value()` result is stable across ``Compile::static_subtype_check()` call. 
> 
> The patch is split into 2 commits: extensive refactoring and the actual fix on top of it.
> 
> Testing:
> - [x] hs-tier1 - hs-tier6

Looks reasonable to me

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

Marked as reviewed by roland (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/4271


More information about the hotspot-compiler-dev mailing list