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

8294468: Fix char-subscripts warnings in Hotspot #10455

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Sep 27, 2022

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
  • The build matrix of:
    • GCC 10
    • {i686, x86_64, aarch64, powerpc64le, s390x, armhf, riscv64}
    • {server}
    • {release, fastdebug}

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

Issue

Reviewers

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 27, 2022

👋 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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 27, 2022
@openjdk
Copy link

openjdk bot commented Sep 27, 2022

@shipilev The following labels will be automatically applied to this pull request:

  • build
  • hotspot

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.

@openjdk openjdk bot added build build-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Sep 27, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 27, 2022

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks.

@openjdk
Copy link

openjdk bot commented Sep 28, 2022

@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:

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 added the ready Pull request is ready to be integrated label Sep 28, 2022
Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

Looks good.

@shipilev
Copy link
Member Author

The GHA failure is unrelated.

/integrate

@openjdk
Copy link

openjdk bot commented Oct 19, 2022

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

  • 7b1c676: 8295662: jdk/incubator/vector tests fail "assert(VM_Version::supports_avx512vlbw()) failed"
  • 5eaf568: 8295668: validate-source failure after JDK-8290011
  • e238920: 8295372: CompactNumberFormat handling of number one with decimal part
  • a5f6e31: 8295456: (ch) sun.nio.ch.Util::checkBufferPositionAligned gives misleading/incorrect error
  • e27bea0: 8290011: IGV: Remove dead code and cleanup
  • d37ce4c: 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation
  • 21aeb9e: 8295429: Update harfbuzz md file
  • 1d883c5: 8295417: Pass $AR to binutils cross-build
  • fc88957: 8286707: JFR: Don't commit JFR internal jdk.JavaMonitorWait events
  • 857b0f9: 8293409: [vectorapi] Intrinsify VectorSupport.indexVector
  • ... and 45 more: https://git.openjdk.org/jdk/compare/4d37ef2d545c016e6c3ad52171ea961d4406726f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 19, 2022
@openjdk openjdk bot closed this Oct 19, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 19, 2022
@openjdk
Copy link

openjdk bot commented Oct 19, 2022

@shipilev Pushed as commit ceb5b08.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@shipilev shipilev deleted the JDK-8294468-warning-char-subscripts branch October 21, 2022 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants