RFR: 8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported
Tobias Hartmann
thartmann at openjdk.java.net
Mon Mar 29 07:18:32 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.
Looks good to me.
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3166
More information about the hotspot-compiler-dev
mailing list