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

8316895: SeenThread::print_action_queue called on a null pointer #15932

Closed
wants to merge 1 commit into from

Conversation

djelinski
Copy link
Member

@djelinski djelinski commented Sep 26, 2023

This patch fixes a crash in test/hotspot/jtreg/runtime/logging/RedefineClasses.java when the code is compiled without -fno-delete-null-pointer-checks.

The test crashes because the method print_action_queue is called on a null object reference, which leads to undefined behavior. Some C++ compilers take that as a permission to assume that this is never null and remove all such checks.

The patch simply changes print_action_queue to a static method taking a pointer to what was formerly this. There's not much that could possibly go wrong.

Should I add the bug ID to test/hotspot/jtreg/runtime/logging/RedefineClasses.java? The existing code does not crash now; it would only start crashing after JDK-8316893 is addressed.


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-8316895: SeenThread::print_action_queue called on a null pointer (Sub-task - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15932

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 26, 2023

👋 Welcome back djelinski! 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 changed the title 8316895 8316895: SeenThread::print_action_queue called on a null pointer Sep 26, 2023
@openjdk
Copy link

openjdk bot commented Sep 26, 2023

@djelinski 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 26, 2023
@djelinski djelinski marked this pull request as ready for review September 26, 2023 18:37
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 26, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 26, 2023

Webrevs

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 good. I don't think it's necessary to add this bug number to the logging/RedefineClasses.java test.
Thank you for fixing this code.
I think this change is trivial and not necessary to wait to check it in.

@openjdk
Copy link

openjdk bot commented Sep 26, 2023

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

8316895: SeenThread::print_action_queue called on a null pointer

Reviewed-by: coleenp, dholmes

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:

  • 2f311d5: 8316211: Open source several manual applet tests
  • 65227a3: 8316389: Open source few AWT applet tests
  • 788e6e1: 8316218: Open some swing tests 5
  • ee9776f: 8304839: Move TestScaffold.main() to the separate class DebugeeWrapper
  • 36ac839: 8073061: (fs) Files.copy(foo, bar, REPLACE_EXISTING) deletes bar even if foo is not readable
  • efb7e85: 8316935: [s390x] Use consistent naming for lightweight locking in MacroAssembler
  • 4e1e579: 8315920: C2: "control input must dominate current control" assert failure

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 added the ready Pull request is ready to be integrated label Sep 26, 2023
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 fine.

Thanks

@djelinski
Copy link
Member Author

Thanks for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Sep 27, 2023

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

  • e39197e: 8316933: RISC-V: compiler/vectorapi/VectorCastShape128Test.java fails when using RVV
  • b659e03: 8316897: tools/jpackage/junit tests fail on AIX after JDK-8316547
  • 83806ab: 6450193: After the first Serialization, JTableHeader does not uninstall its UI
  • 2f311d5: 8316211: Open source several manual applet tests
  • 65227a3: 8316389: Open source few AWT applet tests
  • 788e6e1: 8316218: Open some swing tests 5
  • ee9776f: 8304839: Move TestScaffold.main() to the separate class DebugeeWrapper
  • 36ac839: 8073061: (fs) Files.copy(foo, bar, REPLACE_EXISTING) deletes bar even if foo is not readable
  • efb7e85: 8316935: [s390x] Use consistent naming for lightweight locking in MacroAssembler
  • 4e1e579: 8315920: C2: "control input must dominate current control" assert failure

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 27, 2023

@djelinski Pushed as commit fd52be2.

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

@djelinski djelinski deleted the print-action-queue branch September 27, 2023 08:09
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