-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8332720: ubsan: instanceKlass.cpp:3550:76: runtime error: member call on null pointer of type 'struct Array' #19349
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
@MBaesken 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:
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 20 new commits pushed to the
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 |
Webrevs
|
st->print(BULLET"default_methods: "); | ||
if (default_methods() != nullptr) { default_methods()->print_value_on(st); } | ||
st->cr(); |
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.
The `default_vtable_indicies() printing looks like this:
if (default_vtable_indices() != nullptr) {
st->print(BULLET"default vtable indices: "); default_vtable_indices()->print_value_on(st); st->cr();
}
Should this change make the code follow the same pattern?
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.
Yes, can you put the BULLET"default methods inside the condition to test if default methods are non-null? You could fold it into the below conditional, and have the Verbose test to print each method.
Aside, I thought there was supposed to be a blank in between concatenated strings because some compiler complained.
Good question, I considered this too. |
I usually don't look at these fields, so maybe someone from the Runtime team can help decide? |
Hi Coleen and Stefan, I adjusted/moved the if check .
It is the same at a lot of places in the file so I did not change it here . |
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.
LGTM.
Thanks for the reviews ! /integrate |
Going to push as commit e19a421.
Your commit was automatically rebased without conflicts. |
A drive-by followup: |
When running hs :tier1 tests, with ubsan enabled (configure flag --enable-ubsan), in test runtime/CommandLine/PrintClasses_id0.jtr
this error is reported ; seems we miss a nullptr check that is in place at similar coding in instanceKlass.cpp .
/jdk/src/hotspot/share/oops/instanceKlass.cpp:3550:76: runtime error: member call on null pointer of type 'struct Array'
#0 0x7fed098d2362 in InstanceKlass::print_on(outputStream*) const /jdk/src/hotspot/share/oops/instanceKlass.cpp:3550
#1 0x7fed09897cdc in PrintClassClosure::do_klass(Klass*) /jdk/src/hotspot/share/oops/instanceKlass.cpp:2228
#2 0x7fed08bed334 in ClassLoaderData::classes_do(KlassClosure*) /jdk/src/hotspot/share/classfile/classLoaderData.cpp:387
#3 0x7fed08c06403 in ClassLoaderDataGraph::classes_do(KlassClosure*) /jdk/src/hotspot/share/classfile/classLoaderDataGraph.cpp:303
#4 0x7fed09108768 in VM_PrintClasses::doit() /jdk/src/hotspot/share/services/diagnosticCommand.cpp:989
#5 0x7fed0b776c38 in VM_Operation::evaluate() /jdk/src/hotspot/share/runtime/vmOperations.cpp:75
#6 0x7fed0b7af23e in VMThread::evaluate_operation(VM_Operation*) /jdk/src/hotspot/share/runtime/vmThread.cpp:283
#7 0x7fed0b7b0a67 in VMThread::inner_execute(VM_Operation*) /jdk/src/hotspot/share/runtime/vmThread.cpp:427
#8 0x7fed0b7b1681 in VMThread::loop() /jdk/src/hotspot/share/runtime/vmThread.cpp:493
#9 0x7fed0b7b1681 in VMThread::loop() /jdk/src/hotspot/share/runtime/vmThread.cpp:478
#10 0x7fed0b7b182d in VMThread::run() /jdk/src/hotspot/share/runtime/vmThread.cpp:177
#11 0x7fed0b4e8b0f in Thread::call_run() /jdk/src/hotspot/share/runtime/thread.cpp:225
#12 0x7fed0a9dae75 in thread_native_entry /jdk/src/hotspot/os/linux/os_linux.cpp:846
#13 0x7fed10fed6e9 in start_thread (/lib64/libpthread.so.0+0xa6e9) (BuildId: 2f8d3c2d0f4d7888c2598d2ff6356537f5708a73)
#14 0x7fed1051550e in clone (/lib64/libc.so.6+0x11850e) (BuildId: f732026552f6adff988b338e92d466bc81a01c37)
Progress
Warning
8332720: ubsan: instanceKlass.cpp:3550:76: runtime error: member call on null pointer of type 'struct Array'
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19349/head:pull/19349
$ git checkout pull/19349
Update a local copy of the PR:
$ git checkout pull/19349
$ git pull https://git.openjdk.org/jdk.git pull/19349/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19349
View PR using the GUI difftool:
$ git pr show -t 19349
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19349.diff
Webrev
Link to Webrev Comment