-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8358104: Fix ZGC compilation error on GCC 10.2 #25536
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 qxing! A progress list of the required criteria for merging this PR into |
|
@MaxXSoft 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 6 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@kimbarrett, @jsikstro) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
kimbarrett
left a comment
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.
The change seems okay, though a bit disappointing that it's needed.
The referenced gcc bug seems to have been fixed in gcc11, with backports to
gcc10.3 and gcc9.4. The minimum supported compiler version has always been
somewhat approximate, since there isn't regular testing reported for what are
often rather old versions. Sometimes we just decide to force an update to the
required minimum rather than working around an issue like this.
I wonder why that version is still in use?
|
@kimbarrett Thanks for your review!
My development environment is an Alibaba Cloud ECS server, with Alibaba Cloud Linux 3.2104 LTS. The default C++ compiler in this OS happens to be GCC 10.2.1. |
|
@jsikstro Thanks for your review! /integrate |
|
/sponsor |
|
Going to push as commit a0eb190.
Your commit was automatically rebased without conflicts. |
|
Thanks for the fix @MaxXSoft! Just FYI, we usually allow PRs to be open for at least 24 hours to make sure reviewers from different time zones have a chance to see a PR, but this is a very small change. I'm not sure it was my place (seeing I'm only a Commiter and not a Reviewer) to say this is trivial, but I'd strongly argue it is. |
JDK-8350441 introduced Mapped Cache for ZGC. However, the constructor of
ZMappedCacheuses brace-initialization for_size_class_lists, i.e. aZListarray.ZListis a class with a deleted copy constructor and an explicit destructor, and when its array is brace-initialized in the constructor, it triggers GCC bug 63707. A short example to reproduce this bug: https://godbolt.org/z/3397bxc73The bug causes compilation error of ZGC on GCC versions 10.1 to 10.2. Considering OpenJDK compilation is still requires GCC 10 or higher, this should be recorded as a bug.
This patch uses value-initialization for
_size_class_listsinstead of brace-initialization, which should be semantically equivalent and work on all GCC versions.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25536/head:pull/25536$ git checkout pull/25536Update a local copy of the PR:
$ git checkout pull/25536$ git pull https://git.openjdk.org/jdk.git pull/25536/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25536View PR using the GUI difftool:
$ git pr show -t 25536Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25536.diff
Using Webrev
Link to Webrev Comment