Skip to content


8308088: Improve class check in CollectedHeap::is_oop
Browse files Browse the repository at this point in the history
Reviewed-by: zgu, tschatzl, ayang, stuefe
  • Loading branch information
shipilev committed May 17, 2023
1 parent e34ecc9 commit b300e73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hotspot/share/gc/shared/collectedHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "logging/log.hpp"
#include "logging/logStream.hpp"
#include "memory/classLoaderMetaspace.hpp"
#include "memory/metaspace.hpp"
#include "memory/metaspaceUtils.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
Expand Down Expand Up @@ -227,7 +228,7 @@ bool CollectedHeap::is_oop(oop object) const {
return false;

if (is_in(object->klass_raw())) {
if (!Metaspace::contains(object->klass_raw())) {
return false;

Expand Down

1 comment on commit b300e73

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.