Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/hotspot/share/prims/jvmtiTagMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ class IterateOverHeapObjectClosure: public ObjectClosure {

// invoked for each object in the heap
void IterateOverHeapObjectClosure::do_object(oop o) {
if (o == nullptr) return;
// check if iteration has been halted
if (is_iteration_aborted()) return;

Expand All @@ -953,7 +954,7 @@ void IterateOverHeapObjectClosure::do_object(oop o) {
}

// skip if object is a dormant shared object whose mirror hasn't been loaded
if (o != nullptr && o->klass()->java_mirror() == nullptr) {
if (o->klass()->java_mirror() == nullptr) {
log_debug(aot, heap)("skipped dormant archived object " INTPTR_FORMAT " (%s)", p2i(o),
o->klass()->external_name());
return;
Expand Down Expand Up @@ -1032,14 +1033,15 @@ class IterateThroughHeapObjectClosure: public ObjectClosure {

// invoked for each object in the heap
void IterateThroughHeapObjectClosure::do_object(oop obj) {
if (obj == nullptr) return;
// check if iteration has been halted
if (is_iteration_aborted()) return;

// apply class filter
if (is_filtered_by_klass_filter(obj, klass())) return;

// skip if object is a dormant shared object whose mirror hasn't been loaded
if (obj != nullptr && obj->klass()->java_mirror() == nullptr) {
if (obj->klass()->java_mirror() == nullptr) {
log_debug(aot, heap)("skipped dormant archived object " INTPTR_FORMAT " (%s)", p2i(obj),
obj->klass()->external_name());
return;
Expand Down