RFR: 8267979: C2: Fix verification code in SubTypeCheckNode::Ideal()
Vladimir Ivanov
vlivanov at openjdk.java.net
Mon May 31 10:39:36 UTC 2021
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
-------------
Commit messages:
- Fix
- Cleanups
Changes: https://git.openjdk.java.net/jdk/pull/4271/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4271&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8267979
Stats: 138 lines in 2 files changed: 54 ins; 46 del; 38 mod
Patch: https://git.openjdk.java.net/jdk/pull/4271.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4271/head:pull/4271
PR: https://git.openjdk.java.net/jdk/pull/4271
More information about the hotspot-compiler-dev
mailing list