< prev index next >

src/hotspot/cpu/x86/stubGenerator_x86_64.cpp

Print this page

        

*** 42,51 **** --- 42,54 ---- #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #ifdef COMPILER2 #include "opto/runtime.hpp" #endif + #if INCLUDE_ZGC + #include "gc/z/zThreadLocalData.hpp" + #endif // Declaration and definition of StubGenerator (no .hpp file). // For a more detailed description of the stub routine structure // see the comment in stubRoutines.hpp
*** 1024,1033 **** --- 1027,1045 ---- __ movptr(rax, Address(rsp, oop_to_verify)); // make sure object is 'reasonable' __ testptr(rax, rax); __ jcc(Assembler::zero, exit); // if obj is NULL it is OK + + #if INCLUDE_ZGC + if (UseZGC) { + // Check if metadata bits indicate a bad oop + __ testptr(rax, Address(r15_thread, ZThreadLocalData::address_bad_mask_offset())); + __ jcc(Assembler::notZero, error); + } + #endif + // Check if the oop is in the right area of memory __ movptr(c_rarg2, rax); __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_mask()); __ andptr(c_rarg2, c_rarg3); __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_bits());
< prev index next >