Integrated: 8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported
Fei Yang
fyang at openjdk.java.net
Mon Mar 29 07:49:29 UTC 2021
On Wed, 24 Mar 2021 02:45:14 GMT, Fei Yang <fyang at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 1f54ed07
Author: Fei Yang <fyang at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/1f54ed07
Stats: 4 lines in 2 files changed: 2 ins; 0 del; 2 mod
8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported
Co-authored-by: Yadong Wang <yadonn.wang at huawei.com>
Reviewed-by: thartmann
-------------
PR: https://git.openjdk.java.net/jdk/pull/3166
More information about the hotspot-compiler-dev
mailing list