RFR: 8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported
Fei Yang
fyang at openjdk.java.net
Wed Mar 24 02:57:48 UTC 2021
As shown on the bug, two JVM crashes are witnessed when running the provided test case after disabling match rule support for StrInflatedCopy.
The cause for the first JVM crash is that we are calling has_match_rule for Op_StrInflatedCopy in is_intrinsic_supported.
In this case, we have match rule for Op_StrInflatedCopy but that match rule is not supported.
Patch fixed the first crash by changing the use of has_match_rule into match_rule_supported. match_rule_supported will check has_match_rule at entry point.
In the case for the second JVM crash, the C2 code path is different when match rule for StrInflatedCopy is not supported.
In PhaseStringOpts::copy_latin1_string, we will call GraphKit::inflate_string_slow instread of GraphKit::inflate_string.
We emit one loop in GraphKit::inflate_string_slow, but the method is not marked may have some loops.
Looks like this is missed by JDK-8253923. Patch fixed the second crash by setting _has_loops to true in GraphKit::inflate_string_slow.
Testing: tier 1-3 tested with release & fastdebug build on x86_64 linux with match rule support for StrInflatedCopy explicitly disabled.
-------------
Commit messages:
- 8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported
Changes: https://git.openjdk.java.net/jdk/pull/3166/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3166&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8264096
Stats: 4 lines in 2 files changed: 2 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/3166.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3166/head:pull/3166
PR: https://git.openjdk.java.net/jdk/pull/3166
More information about the hotspot-compiler-dev
mailing list