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

8317294: Classloading throws exceptions over already pending exceptions #15984

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Sep 29, 2023

See the bug for reproducer. I think we are just missing return after throwing the previous exception in ClassFileParser::check_super_interface_access. So we re-enter the method again with another exception in hand and fail the assert. This path is special, because we are looping, and we really need to exit after the first exception.

It is not easy to add a regression test that pokes into super-interfaces from some JDK internals.

Additional testing:

  • CTW reproducer no longer fails
  • Linux AArch64 tier1 tier2 tier3 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

  • JDK-8317294: Classloading throws exceptions over already pending exceptions (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15984

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 29, 2023

👋 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
Copy link

openjdk bot commented Sep 29, 2023

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

  • hotspot-runtime

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.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Sep 29, 2023
@shipilev shipilev marked this pull request as ready for review September 29, 2023 11:52
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 29, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 29, 2023

Webrevs

@shipilev
Copy link
Member Author

shipilev commented Oct 2, 2023

Any takers? @coleenp, @dholmes-ora, I think you are the experts in this code.

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.

Yep this is an oversight from the initial module system implementation.

Thanks.

@openjdk
Copy link

openjdk bot commented Oct 3, 2023

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

8317294: Classloading throws exceptions over already pending exceptions

Reviewed-by: dholmes, coleenp

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

  • f7deaf4: 8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize
  • 8ff10a0: 8317446: ProblemList gc/arguments/TestNewSizeFlags.java on macosx-aarch64 in Xcomp
  • 1809b8c: 8317265: ListFormat::format specification could be made clearer regarding handling IllegalArgumentException.
  • cfabcbf: 8317121: vector_masked_load instruction is moved too early after JDK-8286941
  • b859da9: 8316696: Remove the testing base classes: IntlTest and CollatorTest
  • b438cff: 8314085: Fixing scope from benchmark to thread for JMH tests having shared state
  • ae796a4: 8316923: Add DEF_STATIC_JNI_OnLoad for librmi
  • 89987db: 8303773: Replace "main.wrapper" with "test.thread.factory" property in test code
  • 0e501f6: 8308429: jvmti/StopThread/stopthrd007 failed with "NoClassDefFoundError: Could not initialize class jdk.internal.misc.VirtualThreads"
  • c47a0ce: 8317235: Remove Access API use in nmethod class
  • ... and 67 more: https://git.openjdk.org/jdk/compare/5350fd617390aaaedf8dd8821418c796cb1c38b3...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 Oct 3, 2023
Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

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

This looks fine. I have sort of a preference for the two returns to be after the fthrow so I don't have to look and see what the } below it matches, but if you argue the other way, I don't object.

@shipilev
Copy link
Member Author

shipilev commented Oct 3, 2023

This looks fine. I have sort of a preference for the two returns to be after the fthrow so I don't have to look and see what the } below it matches, but if you argue the other way, I don't object.

It is not a bother to replace with two returns, did so in the new commit. I'll wait for GHA to clear before integrating.

@shipilev
Copy link
Member Author

shipilev commented Oct 4, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Oct 4, 2023

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

  • 48f1a92: 8316679: C2 SuperWord: wrong result, load should not be moved before store if not comparable
  • 0b0f8b5: 8219652: [aix] Tests failing with JNI attach problems.
  • 8c0d026: 8315042: NPE in PKCS7.parseOldSignedData
  • f7deaf4: 8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize
  • 8ff10a0: 8317446: ProblemList gc/arguments/TestNewSizeFlags.java on macosx-aarch64 in Xcomp
  • 1809b8c: 8317265: ListFormat::format specification could be made clearer regarding handling IllegalArgumentException.
  • cfabcbf: 8317121: vector_masked_load instruction is moved too early after JDK-8286941
  • b859da9: 8316696: Remove the testing base classes: IntlTest and CollatorTest
  • b438cff: 8314085: Fixing scope from benchmark to thread for JMH tests having shared state
  • ae796a4: 8316923: Add DEF_STATIC_JNI_OnLoad for librmi
  • ... and 70 more: https://git.openjdk.org/jdk/compare/5350fd617390aaaedf8dd8821418c796cb1c38b3...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 4, 2023

@shipilev Pushed as commit d4c904d.

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

@shipilev shipilev deleted the JDK-8317294-double-exceptions branch November 28, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants