Skip to content

8273342: Null pointer dereference in classFileParser.cpp:2817 #5807

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

Closed
wants to merge 1 commit into from

Conversation

hseigel
Copy link
Member

@hseigel hseigel commented Oct 4, 2021

Hi,

Please review this fix to always return a non-null value from fieldDescriptor::generic_signature() when a generic signature exists, even in places in the function that should never get executed. This will prevent code analyzers from complaining about possible null dereferences by callers of generic_signature().

The change was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux x64.

Thanks, Harold


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8273342: Null pointer dereference in classFileParser.cpp:2817

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5807/head:pull/5807
$ git checkout pull/5807

Update a local copy of the PR:
$ git checkout pull/5807
$ git pull https://git.openjdk.java.net/jdk pull/5807/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5807

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5807.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 4, 2021

👋 Welcome back hseigel! 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 Oct 4, 2021
@openjdk
Copy link

openjdk bot commented Oct 4, 2021

@hseigel 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 Oct 4, 2021
@mlbridge
Copy link

mlbridge bot commented Oct 4, 2021

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.

Looks good!

@openjdk
Copy link

openjdk bot commented Oct 4, 2021

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

8273342: Null pointer dereference in classFileParser.cpp:2817

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

  • a5080ef: 8272564: Incorrect attribution of method invocations of Object methods on interfaces
  • a914ee7: 8274632: Possible pointer overflow in PretouchTask chunk claiming
  • 8f7a37c: 8274434: move os::get_default_process_handle and os::dll_lookup to os_posix for POSIX platforms
  • 3953e07: 8271459: C2: Missing NegativeArraySizeException when creating StringBuilder with negative capacity
  • 53d7e95: 8274635: Use String.equals instead of String.compareTo in jdk.accessibility
  • e43f540: 8274651: Possible race in FontDesignMetrics.KeyReference.dispose
  • 2e542e3: 8274349: ForkJoinPool.commonPool() does not work with 1 CPU
  • 7e757f6: 8274559: JFR: Typo in 'jfr help configure' text
  • 75d6688: 8274745: ProblemList TestSnippetTag.java
  • 9914e5c: 8274610: Add linux-aarch64 to bootcycle build profiles
  • ... and 7 more: https://git.openjdk.java.net/jdk/compare/0828273b898cca5368344e75f1c3f4c3a29dde80...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 4, 2021
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.

LGTM!

Thanks,
David

@hseigel
Copy link
Member Author

hseigel commented Oct 5, 2021

Thanks Coleen and David for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Oct 5, 2021

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

  • a5080ef: 8272564: Incorrect attribution of method invocations of Object methods on interfaces
  • a914ee7: 8274632: Possible pointer overflow in PretouchTask chunk claiming
  • 8f7a37c: 8274434: move os::get_default_process_handle and os::dll_lookup to os_posix for POSIX platforms
  • 3953e07: 8271459: C2: Missing NegativeArraySizeException when creating StringBuilder with negative capacity
  • 53d7e95: 8274635: Use String.equals instead of String.compareTo in jdk.accessibility
  • e43f540: 8274651: Possible race in FontDesignMetrics.KeyReference.dispose
  • 2e542e3: 8274349: ForkJoinPool.commonPool() does not work with 1 CPU
  • 7e757f6: 8274559: JFR: Typo in 'jfr help configure' text
  • 75d6688: 8274745: ProblemList TestSnippetTag.java
  • 9914e5c: 8274610: Add linux-aarch64 to bootcycle build profiles
  • ... and 7 more: https://git.openjdk.java.net/jdk/compare/0828273b898cca5368344e75f1c3f4c3a29dde80...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Oct 5, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 5, 2021
@openjdk
Copy link

openjdk bot commented Oct 5, 2021

@hseigel Pushed as commit 8609ea5.

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

@zhengyu123
Copy link
Contributor

/backport jdk17u

@openjdk
Copy link

openjdk bot commented Oct 5, 2021

@zhengyu123 Unknown command backport - for a list of valid commands use /help.

@zhengyu123
Copy link
Contributor

/backport openjdk/jdk17u

@openjdk
Copy link

openjdk bot commented Oct 5, 2021

@zhengyu123 Unknown command backport - for a list of valid commands use /help.

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
Development

Successfully merging this pull request may close these issues.

4 participants