Skip to content

Commit

Permalink
8332720: ubsan: instanceKlass.cpp:3550:76: runtime error: member call…
Browse files Browse the repository at this point in the history
… on null pointer of type 'struct Array'

Reviewed-by: mdoerr, lucy
Backport-of: e19a421c30534566ba0dea0fa84f812ebeecfc87
  • Loading branch information
MBaesken committed Sep 11, 2024
1 parent 91849bf commit d92d633
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/hotspot/share/oops/instanceKlass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3427,11 +3427,13 @@ void InstanceKlass::print_on(outputStream* st) const {
}
}
st->print(BULLET"method ordering: "); method_ordering()->print_value_on(st); st->cr();
st->print(BULLET"default_methods: "); default_methods()->print_value_on(st); st->cr();
if (Verbose && default_methods() != NULL) {
Array<Method*>* method_array = default_methods();
for (int i = 0; i < method_array->length(); i++) {
st->print("%d : ", i); method_array->at(i)->print_value(); st->cr();
if (default_methods() != nullptr) {
st->print(BULLET"default_methods: "); default_methods()->print_value_on(st); st->cr();
if (Verbose) {
Array<Method*>* method_array = default_methods();
for (int i = 0; i < method_array->length(); i++) {
st->print("%d : ", i); method_array->at(i)->print_value(); st->cr();
}
}
}
if (default_vtable_indices() != NULL) {
Expand Down

1 comment on commit d92d633

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.