--- old/src/share/vm/oops/oop.inline.hpp 2017-06-20 16:28:35.210263052 -0400 +++ new/src/share/vm/oops/oop.inline.hpp 2017-06-20 16:28:34.610260077 -0400 @@ -31,6 +31,7 @@ #include "gc/shared/collectedHeap.inline.hpp" #include "gc/shared/genCollectedHeap.hpp" #include "gc/shared/generation.hpp" +#include "memory/vtBuffer.hpp" #include "oops/arrayKlass.hpp" #include "oops/arrayOop.hpp" #include "oops/klass.inline.hpp" @@ -547,7 +548,12 @@ bool oopDesc::is_oop(bool ignore_mark_word) const { oop obj = (oop) this; if (!check_obj_alignment(obj)) return false; - if (!Universe::heap()->is_in_reserved(obj)) return false; + if (!Universe::heap()->is_in_reserved(obj)) { + assert(obj->klass()->is_value(), "Only value type can be outside of the Java heap"); + VTBufferChunk* chunk = VTBufferChunk::chunk(obj); + assert(chunk->is_valid(), "if not in the heap, should a buffered VT"); + if (!VTBuffer::is_in_vt_buffer(obj)) return false; + } // obj is aligned and accessible in heap if (Universe::heap()->is_in_reserved(obj->klass_or_null())) return false; @@ -561,7 +567,8 @@ if (mark() != NULL) { return true; } - return !SafepointSynchronize::is_at_safepoint(); + return !SafepointSynchronize::is_at_safepoint() + || (obj->klass()->is_value() && !Universe::heap()->is_in_reserved(obj)) ; }