-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
8254125: Assertion in cppVtables.cpp during builds on 32bit Windows #591
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
/label remove hotspot |
@iklam |
/label add hotspot-runtime |
@iklam |
Webrevs
|
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.
This looks reasonable to me, but after testing it on x86_32, I wonder if https://bugs.openjdk.java.net/browse/JDK-8254606 is the problem with this patch, or a different issue.
JDK-8254606 is also caused by JDK-8224509, which has missed some cases where Since the cppVtables assertion fix cannot be easily validated by itself, I've decided to also include the I have tested the fix on linux-x86 (32-bit) but the latest repo seems a bit flaky. Even if I disable CDS, sometime I get failures in (non-CDS) test cases like I was able to run all 200+ CDS tests cases, and I would get about 5 failures due with the above error message. If I ran the failed tests again, they passed. So I think I have fixed the 32-bit issues with CDS, but there are probably other problems with the 32-bit build. Note that Oracle no longer supports the 32-bit x86 VMs. So my fix is intended to ensure that the CDS code is using SharedSpaceObjectAlignment properly, and I can only test thoroughly on our supported platforms. |
That's https://bugs.openjdk.java.net/browse/JDK-8254611 -- I integrated the fix, please merge from master. That said, there are a few failing tests in
|
…cppvtables-assert-on-win32
Thanks for the info. I merged and all CDS tests passed. |
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.
I tested the new patch, and it passes tier1
on Linux x86_32
(well, with some known failures).
@iklam 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Hi Calvin, thanks for the review. For the line |
…cppvtables-assert-on-win32
/integrate |
@iklam Since your change was applied there has been 1 commit pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 5145bed. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Problem: when iterating over the cloned vtables, the original code assumes that they are laid out consecutively in memory. However, since JDK-8224509, the memory allocated for each of the the cloned vtables is now 8-byte aligned. This introduces gaps between the cloned vtables, and causes the assert to fail.
Fix: the fix is to no longer assume the consecutive memory layout. Instead, use the CppVtables::_index array to access each individual cloned vtable.
Note: I also cleaned up the code significantly. I feel the original code is pretty hard to understand, so if I just do the bare minimum to fix the bug, it will be pretty hard to review.
I would suggest that the reviewers look at just the new version of the code and see if it's working as described (instead of looking at the diff to understand what the bug was and how it has been fixed).
This version still uses the x-macro CPP_VTABLE_TYPES_DO to enumerate over the classes whose vtables need to be cloned. I plan to change that into templates in a future RFE.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/591/head:pull/591
$ git checkout pull/591