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: stefank, mdoerr
  • Loading branch information
MBaesken committed May 23, 2024
1 parent 2581935 commit e19a421
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 @@ -3547,11 +3547,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() != nullptr) {
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() != nullptr) {
Expand Down

5 comments on commit e19a421

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@MBaesken
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on e19a421 Jun 6, 2024

Choose a reason for hiding this comment

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

@MBaesken the backport was successfully created on the branch backport-MBaesken-e19a421c-master in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit e19a421c from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 23 May 2024 and was reviewed by Stefan Karlsson and Martin Doerr.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-MBaesken-e19a421c-master:backport-MBaesken-e19a421c-master
$ git checkout backport-MBaesken-e19a421c-master
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-MBaesken-e19a421c-master

@MBaesken
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on e19a421 Sep 4, 2024

Choose a reason for hiding this comment

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

@MBaesken Could not automatically backport e19a421c to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/hotspot/share/oops/instanceKlass.cpp

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-MBaesken-e19a421c-master

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git e19a421c30534566ba0dea0fa84f812ebeecfc87

# Backport the commit
$ git cherry-pick --no-commit e19a421c30534566ba0dea0fa84f812ebeecfc87
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport e19a421c30534566ba0dea0fa84f812ebeecfc87'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport e19a421c30534566ba0dea0fa84f812ebeecfc87.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit e19a421c from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 23 May 2024 and was reviewed by Stefan Karlsson and Martin Doerr.

Thanks!

Please sign in to comment.