--- old/src/hotspot/share/compiler/oopMap.cpp 2018-06-01 22:29:48.223619682 +0200 +++ new/src/hotspot/share/compiler/oopMap.cpp 2018-06-01 22:29:47.966608588 +0200 @@ -380,8 +380,12 @@ continue; } #ifdef ASSERT - if ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) || - !Universe::heap()->is_in_or_null(*loc)) { + // We can not verify the oop here if we are using ZGC, the oop + // will be bad in case we had a safepoint between a load and a + // load barrier. + if (ZGC_ONLY(!UseZGC &&) + ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) || + !Universe::heap()->is_in_or_null(*loc))) { tty->print_cr("# Found non oop pointer. Dumping state at failure"); // try to dump out some helpful debugging information trace_codeblob_maps(fr, reg_map);