Skip to content

Commit

Permalink
8292385: assert(ctrl == kit.control()) failed: Control flow was added…
Browse files Browse the repository at this point in the history
… although the intrinsic bailed out

Reviewed-by: thartmann, jiefu, kvn
  • Loading branch information
dean-long committed Sep 2, 2022
1 parent 3993a1f commit 5757e21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hotspot/share/opto/library_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1615,12 +1615,19 @@ bool LibraryCallKit::inline_string_char_access(bool is_store) {
return false;
}

// Save state and restore on bailout
uint old_sp = sp();
SafePointNode* old_map = clone_map();

value = must_be_not_null(value, true);

Node* adr = array_element_address(value, index, T_CHAR);
if (adr->is_top()) {
set_map(old_map);
set_sp(old_sp);
return false;
}
old_map->destruct(&_gvn);
if (is_store) {
access_store_at(value, adr, TypeAryPtr::BYTES, ch, TypeInt::CHAR, T_CHAR, IN_HEAP | MO_UNORDERED | C2_MISMATCHED);
} else {
Expand Down

3 comments on commit 5757e21

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 5757e21 Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 5757e21 Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch GoeLin-backport-5757e212 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 5757e212 from the openjdk/jdk repository.

The commit being backported was authored by Dean Long on 2 Sep 2022 and was reviewed by Tobias Hartmann, Jie Fu and Vladimir Kozlov.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-5757e212:GoeLin-backport-5757e212
$ git checkout GoeLin-backport-5757e212
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-5757e212

Please sign in to comment.