Skip to content

Commit

Permalink
Backport e297e8817f486e4af850c97fcff859c3e9a9e21c
Browse files Browse the repository at this point in the history
  • Loading branch information
shipilev authored and earthling-amzn committed Oct 15, 2024
1 parent 520fb4e commit a86ee2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void ShenandoahAsserts::assert_correct(void* interior_loc, oop obj, const char*
// Do additional checks for special objects: their fields can hold metadata as well.
// We want to check class loading/unloading did not corrupt them.

if (java_lang_Class::is_instance(obj)) {
if (obj_klass == vmClasses::Class_klass()) {
Metadata* klass = obj->metadata_field(java_lang_Class::klass_offset());
if (klass != nullptr && !Metaspace::contains(klass)) {
print_failure(_safe_all, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class ShenandoahVerifyOopClosure : public BasicOopIterateClosure {
// Do additional checks for special objects: their fields can hold metadata as well.
// We want to check class loading/unloading did not corrupt them.

if (java_lang_Class::is_instance(obj)) {
if (obj_klass == vmClasses::Class_klass()) {
Metadata* klass = obj->metadata_field(java_lang_Class::klass_offset());
check(ShenandoahAsserts::_safe_oop, obj,
klass == nullptr || Metaspace::contains(klass),
Expand Down

0 comments on commit a86ee2a

Please sign in to comment.