Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8257965: [lworld] C2 compilation fails with assert(unc->peek_monitor_obj() == obj) failed: wrong monitor #299

Closed
wants to merge 2 commits into from

Conversation

TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Dec 9, 2020

The assert is too strong because when locking on an object that became known to be an inline type only after parsing, C2 might have scalarized peek_monitor_obj() in the debug info of the uncommon trap. I've adjusted the assert but found another problem while writing tests: C2 can eliminate a lock even if the type is not statically known (and therefore could be an inline type) as long as Escape Analysis is able to prove that he object is non-escaping (see TestLWorld::test133). We need to add an inline type check to PhaseMacroExpand::eliminate_locking_node as well.

Thanks,
Tobias


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8257965: [lworld] C2 compilation fails with assert(unc->peek_monitor_obj() == obj) failed: wrong monitor

Download

$ git fetch https://git.openjdk.java.net/valhalla pull/299/head:pull/299
$ git checkout pull/299

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 9, 2020

👋 Welcome back thartmann! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 9, 2020

@TobiHartmann This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8257965: [lworld] C2 compilation fails with assert(unc->peek_monitor_obj() == obj) failed: wrong monitor

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the lworld branch:

  • 1a7dcb4: 8257579: [lworld] C2 compilation fails because ret_addr_offset() is not within emitted code

Please see this link for an up-to-date comparison between the source branch of this pull request and the lworld branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the lworld branch, type /integrate in a new comment.

@mlbridge
Copy link

mlbridge bot commented Dec 9, 2020

Webrevs

@TobiHartmann
Copy link
Member Author

TobiHartmann commented Dec 10, 2020

/integrate

@openjdk openjdk bot closed this Dec 10, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Dec 10, 2020
@openjdk
Copy link

openjdk bot commented Dec 10, 2020

@TobiHartmann Since your change was applied there has been 1 commit pushed to the lworld branch:

  • 1a7dcb4: 8257579: [lworld] C2 compilation fails because ret_addr_offset() is not within emitted code

Your commit was automatically rebased without conflicts.

Pushed as commit 6d1ca78.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant