jdk
jdk copied to clipboard
8294468: Fix char-subscripts warnings in Hotspot
There seem to be the only place in Hotspot where this warning fires, yet the warning is disabled wholesale for Hotspot. This is not good.
I can trace the addition of char-subscripts exclusion to JDK-8211029 (Sep 2018). The only place in Hotspot where in fires is present from the initial load (2007).
The underlying problem that this warning tells us about is that char might be signed on some platforms, so we can potentially access the negative index. It is not a bug in our current code, that bounds the value of k under MAXID-1, which is 19.
Additional testing:
- [ ] Linux x86_64 fastdebug
tier1 - [x] The build matrix of:
- GCC 10
- {i686, x86_64, aarch64, powerpc64le, s390x, armhf, riscv64}
- {server}
- {release, fastdebug}
Progress
- [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8294468: Fix char-subscripts warnings in Hotspot
Reviewers
- David Holmes (@dholmes-ora - Reviewer)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10455/head:pull/10455
$ git checkout pull/10455
Update a local copy of the PR:
$ git checkout pull/10455
$ git pull https://git.openjdk.org/jdk pull/10455/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10455
View PR using the GUI difftool:
$ git pr show -t 10455
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10455.diff
:wave: Welcome back shade! 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.
@shipilev The following labels will be automatically applied to this pull request:
buildhotspot
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.
@shipilev 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:
8294468: Fix char-subscripts warnings in Hotspot
Reviewed-by: dholmes, kbarrett
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 45 new commits pushed to the master branch:
- 3f3d63d02ada66d5739e690d786684d25dc59004: 8294211: Zero: Decode arch-specific error context if possible
- f502ab85c987be827d36b0a29f77ec5ce5bb3d01: 8295435: Build failure with GCC7 after JDK-8294314 due to strict-overflow warnings
- 3f4964f83d6f03efbee2fb34aa8258d4fc923efb: 8293291: Simplify relocation of native pointers in archive heap
- 1553551d821d92e529116e6ce56846831b13f492: 8286918: Better HttpServer service
- 400aa2fb2c00c783f08b8e8dfc0ef9e63cbc4607: 8286511: Improve macro allocation
- 2cee77444feb7911dc2234cbde0dccee4e6279c9: 8289366: Improve HTTP/2 client usage
- 1ae683652134782745c4a7f261af3cbfc241e683: 8288508: Enhance ECDSA usage
- 40539de8da78294a6d0ff0236687817cd767754b: 8286910: Improve JNDI lookups
- 896a29dfaef6f0fb8e90b85205b599923d6e9e53: 8287446: Enhance icon presentations
- 5a8e5ea3e234dc50935c09519791a59ee84f08c0: 8286526: Improve NTLM support
- ... and 35 more: https://git.openjdk.org/jdk/compare/4d37ef2d545c016e6c3ad52171ea961d4406726f...master
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.
The GHA failure is unrelated.
/integrate
Going to push as commit ceb5b08964e34dfae3819257e5df460f24f92a78.
Since your change was applied there have been 55 commits pushed to the master branch:
- 7b1c6767fc5ea90630776e5bfa0fcc47ffc89aa6: 8295662: jdk/incubator/vector tests fail "assert(VM_Version::supports_avx512vlbw()) failed"
- 5eaf5686656a10ee27977de23ed5290a723b96a8: 8295668: validate-source failure after JDK-8290011
- e238920bb69836e982138cb7e1fed2a39182df8f: 8295372: CompactNumberFormat handling of number one with decimal part
- a5f6e31ccbef27f4f363a80d41d5c9c1cae75151: 8295456: (ch) sun.nio.ch.Util::checkBufferPositionAligned gives misleading/incorrect error
- e27bea0c4db282e26d0d96611bb330e02c314d48: 8290011: IGV: Remove dead code and cleanup
- d37ce4cdd18afc4facf996598f79e72aae68f4ff: 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation
- 21aeb9e7946fc7450ee48939944a69c8aa04bcce: 8295429: Update harfbuzz md file
- 1d883c5312721980898f91898665b528948a985b: 8295417: Pass $AR to binutils cross-build
- fc889577eaf3f564d896818c1d9b1eb6fa5a8758: 8286707: JFR: Don't commit JFR internal jdk.JavaMonitorWait events
- 857b0f9b05bc711f3282a0da85fcff131fffab91: 8293409: [vectorapi] Intrinsify VectorSupport.indexVector
- ... and 45 more: https://git.openjdk.org/jdk/compare/4d37ef2d545c016e6c3ad52171ea961d4406726f...master
Your commit was automatically rebased without conflicts.
@shipilev Pushed as commit ceb5b08964e34dfae3819257e5df460f24f92a78.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.