*** 227,11 *** if (!is_in(object)) { return false; } ! if (!Metaspace::contains(object->klass_without_asserts())) { return false; } return true; } --- 227,13 --- if (!is_in(object)) { return false; } ! // With compact headers, we can't safely access the class, due + // to possibly forwarded objects. + if (!UseCompactObjectHeaders && !Metaspace::contains(object->klass_without_asserts())) { return false; } return true; }