-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8295435: Build failure with GCC7 after JDK-8294314 due to strict-overflow warnings #10738
Conversation
👋 Welcome back jiefu! A progress list of the required criteria for merging this PR into |
@DamonFool The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
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.
My CI reports the mainline failures with GCC 6 in the following configs:
linux-x86_64-server-fastdebug
linux-aarch64-server-fastdebug
linux-arm-server-fastdebug
linux-ppc64le-server-fastdebug
linux-s390x-server-fastdebug
linux-ppc64-server-fastdebug
This PR solves part of the failures, but some require more work:
diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
index 77d1ff6e21c..816eb4d9996 100644
--- a/make/hotspot/lib/CompileJvm.gmk
+++ b/make/hotspot/lib/CompileJvm.gmk
@@ -166,2 +166,3 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
DISABLED_WARNINGS_gcc_loopnode.cpp := sequence-point, \
+ DISABLED_WARNINGS_gcc_objArrayKlass.cpp := strict-overflow, \
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
Since the warning seems to be caused by the popular header, it is likely to break some other platforms/files through the different include paths from the different compilation units. The warning also looks fairly dubious, and probably is GCC bug, as it does not trigger with higher GCCs? Because of this, I suggest we add strict-overflow
back to the global warning exclusion list:
diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
index 6d4e01d1aed..534c50cc77a 100644
--- a/make/hotspot/lib/CompileJvm.gmk
+++ b/make/hotspot/lib/CompileJvm.gmk
@@ -94,6 +94,8 @@ DISABLED_WARNINGS_clang := ignored-qualifiers sometimes-uninitialized \
ifneq ($(DEBUG_LEVEL), release)
# Assert macro gives warning
DISABLED_WARNINGS_clang += tautological-constant-out-of-range-compare
+ # Some reasonable asserts produce warnings on GCC <= 7
+ DISABLED_WARNINGS_gcc += strict-overflow
endif
DISABLED_WARNINGS_xlc := tautological-compare shift-negative-value
/contributor add shipilev |
Good suggestion. |
@DamonFool Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
/contributor add shade |
@DamonFool |
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 am good with this. Let's hear from @magicus too.
@DamonFool 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 35 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.
That's fine, I guess. We have no easy mechanism for testing a condition like "gcc 7 or older" in the makefiles. I hope we raise the bar for gcc soon, and then we can go back and remove this.
Going to push as commit f502ab8.
Your commit was automatically rebased without conflicts. |
@DamonFool Pushed as commit f502ab8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi all,
Let's disable
-Werror=strict-overflow
to get it build with gcc7 on Linux/x86.Thanks.
Best regards,
Jie
Progress
Issue
Reviewers
Contributors
<shade@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10738/head:pull/10738
$ git checkout pull/10738
Update a local copy of the PR:
$ git checkout pull/10738
$ git pull https://git.openjdk.org/jdk pull/10738/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10738
View PR using the GUI difftool:
$ git pr show -t 10738
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10738.diff