diff --git a/insns.def b/insns.def index 8716ea93e..696354d63 100644 --- a/insns.def +++ b/insns.def @@ -1320,7 +1320,7 @@ setinlinecache { IC ic = GET_CONST_INLINE_CACHE(dst); - ic->ic_value = val; + GC_WB(&ic->ic_value, val); ic->ic_vmstat = GET_VM_STATE_VERSION(); } diff --git a/iseq.c b/iseq.c index 78793cb12..477ad21e6 100644 --- a/iseq.c +++ b/iseq.c @@ -113,18 +113,18 @@ set_relation(rb_iseq_t *iseq, const VALUE parent) /* set class nest stack */ if (type == ISEQ_TYPE_TOP) { /* toplevel is private */ - iseq->cref_stack = NEW_BLOCK(th->top_wrapper ? th->top_wrapper : rb_cObject); + GC_WB(&iseq->cref_stack, NEW_BLOCK(th->top_wrapper ? th->top_wrapper : rb_cObject)); iseq->cref_stack->nd_file = 0; iseq->cref_stack->nd_visi = NOEX_PRIVATE; } else if (type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) { - iseq->cref_stack = NEW_BLOCK(0); /* place holder */ + GC_WB(&iseq->cref_stack, NEW_BLOCK(0)); /* place holder */ iseq->cref_stack->nd_file = 0; } else if (RTEST(parent)) { rb_iseq_t *piseq; GetISeqPtr(parent, piseq); - iseq->cref_stack = piseq->cref_stack; + GC_WB(&iseq->cref_stack, piseq->cref_stack); } if (type == ISEQ_TYPE_TOP ||