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

8293044: C1: Missing access check on non-accessible class #10222

Closed
wants to merge 3 commits into from

Conversation

iwanowww
Copy link

@iwanowww iwanowww commented Sep 8, 2022

C1 erroneously omits some access checks on symbolically referenced classes.

Proposed fix relies on code patching to throw proper resolution error when required.

Also, to avoid repeated recompilations on platforms which don't support code
patching, the nmethod is not marked as non-entrant when corresponding constant
pool entry is in error state.

Testing: hs-tier1 - hs-tier4

/cc hotspot-compiler


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

  • JDK-8293044: C1: Missing access check on non-accessible class

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10222/head:pull/10222
$ git checkout pull/10222

Update a local copy of the PR:
$ git checkout pull/10222
$ git pull https://git.openjdk.org/jdk pull/10222/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10222

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10222.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 8, 2022

👋 Welcome back vlivanov! 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 hotspot-compiler hotspot-compiler-dev@openjdk.org label Sep 8, 2022
@openjdk
Copy link

openjdk bot commented Sep 8, 2022

@iwanowww
The hotspot-compiler label was successfully added.

@iwanowww iwanowww force-pushed the 8293044.c1.access_check branch 2 times, most recently from 1c7d19c to 5c01532 Compare September 8, 2022 17:50
@iwanowww iwanowww marked this pull request as ready for review September 8, 2022 18:02
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 8, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 8, 2022

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann 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 to me otherwise.

src/hotspot/share/ci/ciStreams.cpp Outdated Show resolved Hide resolved
test/hotspot/jtreg/compiler/c1/KlassAccessCheckTest.java Outdated Show resolved Hide resolved
@openjdk
Copy link

openjdk bot commented Sep 9, 2022

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

8293044: C1: Missing access check on non-accessible class

Reviewed-by: thartmann, dlong

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

  • 91d00b3: 8288473: Remove unused frame::set_pc_preserve_deopt methods
  • 45ff10c: 8292695: SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
  • dbec22b: 8293287: add ReplayReduce flag
  • b8598b0: 8291660: Grapheme support in BreakIterator
  • a14c3a4: 8288933: Improve the implementation of Double/Float.isInfinite
  • 00befdd: 8292675: Add identity transformation for removing redundant AndV/OrV nodes
  • 7169ee5: 8293477: IGV: Upgrade to Netbeans Platform 15
  • 3dd94f3: 8292671: Hotspot Style Guide should allow covariant returns
  • 9d6b028: 8234315: GTK LAF does not gray out disabled JMenu
  • 812d805: 6447816: Provider filtering (getProviders) is not working with OR'd conditions
  • ... and 2 more: https://git.openjdk.org/jdk/compare/30d4145e2edd2d3e4cbaa8b01f7639ab53bc0991...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.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 9, 2022
Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
@openjdk-notifier
Copy link

@iwanowww Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

Copy link
Member

@dean-long dean-long 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.

@iwanowww
Copy link
Author

iwanowww commented Sep 9, 2022

Thanks for the reviews, Tobias and Dean.

/integrate

@openjdk
Copy link

openjdk bot commented Sep 9, 2022

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

  • 91d00b3: 8288473: Remove unused frame::set_pc_preserve_deopt methods
  • 45ff10c: 8292695: SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
  • dbec22b: 8293287: add ReplayReduce flag
  • b8598b0: 8291660: Grapheme support in BreakIterator
  • a14c3a4: 8288933: Improve the implementation of Double/Float.isInfinite
  • 00befdd: 8292675: Add identity transformation for removing redundant AndV/OrV nodes
  • 7169ee5: 8293477: IGV: Upgrade to Netbeans Platform 15
  • 3dd94f3: 8292671: Hotspot Style Guide should allow covariant returns
  • 9d6b028: 8234315: GTK LAF does not gray out disabled JMenu
  • 812d805: 6447816: Provider filtering (getProviders) is not working with OR'd conditions
  • ... and 2 more: https://git.openjdk.org/jdk/compare/30d4145e2edd2d3e4cbaa8b01f7639ab53bc0991...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 9, 2022

@iwanowww Pushed as commit 005b49b.

💡 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
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants