-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() #26002
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back asemenov! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
/issue add 8360670 |
@savoptik |
…ap.cpp in IterateOverHeapObjectClosure::do_object() Found by Linux Verification Center (linuxtesting.org) with SVACE. signed-off-by: Artem Semenov <[email protected]>
ee6a0ff
to
e69c49c
Compare
@savoptik Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
It's concerning that we don't have tests cases that uncover these bugs. Perhaps it's not actually possible for NULL to be passed when constructing CallbackWrapper. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a false positive from the static code analyzer. If we are iterating over the heap then the closure is only ever passed actual oops, so it can't be null.
At most I would add an assert, but generally my understanding is that the user of any closure has the responsibility of passing it valid input.
Adding asserts sounds like a good suggestion. |
I'm a little bit confused why we have twp bugs for this issue. |
The defect has been detected and confirmed in the function
IterateOverHeapObjectClosure::do_object()
located in the filesrc/hotspot/share/prims/jvmtiTagMap.cpp
with static code analysis. This defect can potentially lead to a null pointer dereference.The pointer
oop o
is passed to the constructor of the CallbackWrapper class, where it is dereferenced without a null check.Progress
Issues
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26002/head:pull/26002
$ git checkout pull/26002
Update a local copy of the PR:
$ git checkout pull/26002
$ git pull https://git.openjdk.org/jdk.git pull/26002/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26002
View PR using the GUI difftool:
$ git pr show -t 26002
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26002.diff
Using Webrev
Link to Webrev Comment