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

8210988: Improved handling of compiler warnings in the build #2606

Closed
wants to merge 7 commits into from

Conversation

luchenlin
Copy link
Contributor

@luchenlin luchenlin commented Mar 18, 2024

I backport this for parity with 11.0.24-oracle.
make/hotspot/lib/CompileGtest.gmk
‘DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft)
4146, \’
make/hotspot/lib/CompileJvm.gmk
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft) 4146, \

The DISABLED_WARNINGS_microsoft change to 4146 as in src\hotspot\cpu\aarch64\register_aarch64.hpp(285)
'uint32_t first = _bitset & -_bitset' remains.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8210988 needs maintainer approval

Issue

  • JDK-8210988: Improved handling of compiler warnings in the build (Bug - P3 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/2606/head:pull/2606
$ git checkout pull/2606

Update a local copy of the PR:
$ git checkout pull/2606
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/2606/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2606

View PR using the GUI difftool:
$ git pr show -t 2606

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/2606.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 18, 2024

👋 Welcome back andrewlu! A progress list of the required criteria for merging this PR into master 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 Mar 18, 2024

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

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

8210988: Improved handling of compiler warnings in the build

Reviewed-by: lucy

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 7 new commits pushed to the master branch:

  • d98b460: 8317507: C2 compilation fails with "Exceeded _node_regs array"
  • b7f78a3: 8319436: Proxy.newProxyInstance throws NPE if loader is null and interface not visible from class loader
  • 37cfd48: 8328705: GHA: Cross-compilation jobs do not require build JDK
  • 6aa7216: 8324632: Update Zlib Data Compression Library to Version 1.3.1
  • f8225a4: 8313206: PKCS11 tests silently skip execution
  • 8c18317: 8270199: Most SA tests are skipped on macosx-aarch64 because all executables are signed
  • c782d4c: 8312383: Log X509ExtendedKeyManager implementation class name in TLS/SSL connection

Please see this link for an up-to-date comparison between the source branch of this pull request and the master 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 master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title Backport 09a967ab8143c3d4b0824a0027edaf0e634686ec 8210988: Improved handling of compiler warnings in the build Mar 18, 2024
@openjdk
Copy link

openjdk bot commented Mar 18, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Mar 18, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 18, 2024

Webrevs

Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openjdk
Copy link

openjdk bot commented Mar 22, 2024

⚠️ @luchenlin This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the approval label Mar 25, 2024
@GoeLin
Copy link
Member

GoeLin commented Mar 25, 2024

Hi @luchenlin, @RealLucy,
are you sure the build errors are unrelated?

d:\a\jdk11u-dev\jdk11u-dev\src\hotspot\cpu\aarch64\register_aarch64.hpp(285): error C2220: the following warning is treated as an error
d:\a\jdk11u-dev\jdk11u-dev\src\hotspot\cpu\aarch64\register_aarch64.hpp(285): warning C4146: unary minus operator applied to unsigned type, result still unsigned
make[3]: *** [lib/CompileGtest.gmk:64: /d/a/jdk11u-dev/jdk11u-dev/build/windows-aarch64/hotspot/variant-server/libjvm/gtest/objs/BUILD_GTEST_LIBJVM_pch.obj] Error 1
make[2]: *** [make/Main.gmk:272: hotspot-server-libs] Error 2

Best regards, Goetz.

@openjdk openjdk bot removed the approval label Mar 25, 2024
@luchenlin
Copy link
Contributor Author

Hi @luchenlin, @RealLucy, are you sure the build errors are unrelated?

d:\a\jdk11u-dev\jdk11u-dev\src\hotspot\cpu\aarch64\register_aarch64.hpp(285): error C2220: the following warning is treated as an error d:\a\jdk11u-dev\jdk11u-dev\src\hotspot\cpu\aarch64\register_aarch64.hpp(285): warning C4146: unary minus operator applied to unsigned type, result still unsigned make[3]: *** [lib/CompileGtest.gmk:64: /d/a/jdk11u-dev/jdk11u-dev/build/windows-aarch64/hotspot/variant-server/libjvm/gtest/objs/BUILD_GTEST_LIBJVM_pch.obj] Error 1 make[2]: *** [make/Main.gmk:272: hotspot-server-libs] Error 2

Best regards, Goetz.

Hi @GoeLin, not sure about this, is this like the related backport? https://bugs.openjdk.org/browse/JDK-8211081

@openjdk
Copy link

openjdk bot commented Mar 25, 2024

⚠️ @luchenlin This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@mlbridge
Copy link

mlbridge bot commented Mar 25, 2024

Mailing list message from Lindenmaier, Goetz on jdk-updates-dev:

Hi,

The problematic coding is
src\hotspot\cpu\aarch64\register_aarch64.hpp(285):
uint32_t first = _bitset & -_bitset;

It has moved in 17, but is unchanged.
So there does not exist a fix directly in the C++ coding.
This leaves two cases
* We use a different compiler for 11 and 17 windows aarch64 builds
* The warning is suppressed somehow in 17

Ahh... This is warning C4146, which you remove here:
make/hotspot/lib/CompileGtest.gmk
- DISABLED_WARNINGS_microsoft := 4146, \

Maybe you need to add it again below. (Instead, you add 4996)?
Ev. compare with the original change.
But this is the Gtest makefile, so unlikely that it helps.

This looks strange, too:

make/hotspot/lib/CompileJvm.gmk
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
DISABLED_WARNINGS_microsoft := 4146, \

Doesn't this overwrite the first setting? Should it be
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft) 4146, \

Also compare with the original change, or the code in 17.

Unfortunately we don't have a build for this platform locally,
so you need to try with the GHA testing.

Best regards, Goetz.

@openjdk openjdk bot added approval ready Pull request is ready to be integrated and removed approval labels Mar 27, 2024
@luchenlin
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 28, 2024

Going to push as commit 29a08f7.
Since your change was applied there have been 8 commits pushed to the master branch:

  • 4117953: 8273831: PrintServiceLookup spawns 2 threads in the current classloader, getting orphaned
  • d98b460: 8317507: C2 compilation fails with "Exceeded _node_regs array"
  • b7f78a3: 8319436: Proxy.newProxyInstance throws NPE if loader is null and interface not visible from class loader
  • 37cfd48: 8328705: GHA: Cross-compilation jobs do not require build JDK
  • 6aa7216: 8324632: Update Zlib Data Compression Library to Version 1.3.1
  • f8225a4: 8313206: PKCS11 tests silently skip execution
  • 8c18317: 8270199: Most SA tests are skipped on macosx-aarch64 because all executables are signed
  • c782d4c: 8312383: Log X509ExtendedKeyManager implementation class name in TLS/SSL connection

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 28, 2024
@openjdk openjdk bot closed this Mar 28, 2024
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Mar 28, 2024
@openjdk openjdk bot removed the rfr Pull request is ready for review label Mar 28, 2024
@openjdk
Copy link

openjdk bot commented Mar 28, 2024

@luchenlin Pushed as commit 29a08f7.

💡 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
Labels
backport integrated Pull request has been integrated
3 participants