Skip to content

Commit 7cd3d7f

Browse files
committed
8372376: ZGC: Inaccurate verification of raw nulls in flip promoting pages
Reviewed-by: stefank, sjohanss, aboldtch
1 parent 848c0c7 commit 7cd3d7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/hotspot/share/gc/z/zVerify.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ static void z_verify_root_oop_object(zaddress addr, void* p) {
130130

131131
static void z_verify_old_oop(zpointer* p) {
132132
const zpointer o = *p;
133-
assert(o != zpointer::null, "Old should not contain raw null");
133+
if (o == zpointer::null) {
134+
guarantee(ZGeneration::young()->is_phase_mark_complete(), "Only possible when flip promoting");
135+
guarantee(ZHeap::heap()->page(p)->is_allocating(), "Raw nulls only possible in allocating pages");
136+
}
134137
if (!z_is_null_relaxed(o)) {
135138
if (ZPointer::is_mark_good(o)) {
136139
// Even though the pointer is mark good, we can't verify that it should

0 commit comments

Comments
 (0)