RFR: 8267979: C2: Fix verification code in SubTypeCheckNode::Ideal()
Nils Eliasson
neliasso at openjdk.java.net
Mon May 31 14:00:21 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 good.
-------------
Marked as reviewed by neliasso (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4271
More information about the hotspot-compiler-dev
mailing list