-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8361363: ShenandoahAsserts::print_obj() does not work for forwarded objects and UseCompactObjectHeaders #26117
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
Conversation
👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into |
@tstuefe 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:
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 48 new commits pushed to the
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two peculiarities in this method. It is normally called from diagnostics code, and so we are not 100% sure it it is even safe to reach through the fwdptr for klass. Second, we should be printing the raw header at least in some cases, because again, diagnostics.
Let me think about it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know what, this is fine as it is.
The whole business with ShenandoahForwarding::klass
is super-duper-awkward, and verifier already touches the forwardees using that method in places where it really should not. It needs a more comprehensive fix for +UCOH
.
It is a mess, but not your mess. So integrate this one, we will figure out ShenandoahForwarding::klass
after this.
I had a similar thought while working on https://bugs.openjdk.org/browse/JDK-8361342 . And yes, printing the raw header (and possibly the first few payload words, to get a bit of the first members) I found very useful. os::print_hex_dump will tiptoe around invalid memory, so that should be fine to do. |
Going to push as commit fe26467.
Your commit was automatically rebased without conflicts. |
ShenandoahAsserts::print_obj()
does not work for COH if the object is forwarded, since the mark word is overwritten with a forwarding pointer.Depending on the size of the non-null bits of the forwardee (whether it spills into the nKlass bits), nKlass is either zero or garbage. So we get either an "assert(!is_null(v)) failed: narrow klass value can never be zero", or a SIGSEGV.
Fix is trivial: don't use obj->klass() directly but get it from ShenandoahForwarding.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26117/head:pull/26117
$ git checkout pull/26117
Update a local copy of the PR:
$ git checkout pull/26117
$ git pull https://git.openjdk.org/jdk.git pull/26117/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26117
View PR using the GUI difftool:
$ git pr show -t 26117
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26117.diff
Using Webrev
Link to Webrev Comment