8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported

Co-authored-by: Yadong Wang <yadonn.wang@huawei.com>
Reviewed-by: thartmann
This commit is contained in:
Fei Yang 2021-03-29 07:45:49 +00:00
parent 447e0dfe6b
commit 1f54ed07ad
2 changed files with 4 additions and 2 deletions

View File

@ -179,11 +179,11 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
switch (id) {
case vmIntrinsics::_compressStringC:
case vmIntrinsics::_compressStringB:
if (!Matcher::has_match_rule(Op_StrCompressedCopy)) return false;
if (!Matcher::match_rule_supported(Op_StrCompressedCopy)) return false;
break;
case vmIntrinsics::_inflateStringC:
case vmIntrinsics::_inflateStringB:
if (!Matcher::has_match_rule(Op_StrInflatedCopy)) return false;
if (!Matcher::match_rule_supported(Op_StrInflatedCopy)) return false;
break;
case vmIntrinsics::_compareToL:
case vmIntrinsics::_compareToU:

View File

@ -4228,6 +4228,8 @@ void GraphKit::inflate_string_slow(Node* src, Node* dst, Node* start, Node* coun
* }
*/
add_empty_predicates();
C->set_has_loops(true);
RegionNode* head = new RegionNode(3);
head->init_req(1, control());
gvn().set_type(head, Type::CONTROL);