Skip to content

Commit 8128ca1

Browse files
committed
8269066: assert(ZAddress::is_marked(addr)) failed: Should be marked
Reviewed-by: eosterlund, stefank, kbarrett, tschatzl
1 parent 1323be5 commit 8128ca1

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,21 @@ int ZBarrierSetC2::estimate_stub_size() const {
194194

195195
static void set_barrier_data(C2Access& access) {
196196
if (ZBarrierSet::barrier_needed(access.decorators(), access.type())) {
197-
if (access.decorators() & ON_WEAK_OOP_REF) {
198-
access.set_barrier_data(ZLoadBarrierWeak);
197+
uint8_t barrier_data = 0;
198+
199+
if (access.decorators() & ON_PHANTOM_OOP_REF) {
200+
barrier_data |= ZLoadBarrierPhantom;
201+
} else if (access.decorators() & ON_WEAK_OOP_REF) {
202+
barrier_data |= ZLoadBarrierWeak;
199203
} else {
200-
access.set_barrier_data(ZLoadBarrierStrong);
204+
barrier_data |= ZLoadBarrierStrong;
205+
}
206+
207+
if (access.decorators() & AS_NO_KEEPALIVE) {
208+
barrier_data |= ZLoadBarrierNoKeepalive;
201209
}
210+
211+
access.set_barrier_data(barrier_data);
202212
}
203213
}
204214

0 commit comments

Comments
 (0)