@@ -3367,20 +3367,22 @@ rb_execution_context_update(rb_execution_context_t *ec)
33673367 }
33683368
33693369 while (cfp != limit_cfp ) {
3370- const VALUE * ep = cfp -> ep ;
3371- cfp -> self = rb_gc_location (cfp -> self );
3372- cfp -> iseq = (rb_iseq_t * )rb_gc_location ((VALUE )cfp -> iseq );
3373- cfp -> block_code = (void * )rb_gc_location ((VALUE )cfp -> block_code );
3374-
3375- if (!VM_ENV_LOCAL_P (ep )) {
3376- const VALUE * prev_ep = VM_ENV_PREV_EP (ep );
3377- if (VM_ENV_FLAGS (prev_ep , VM_ENV_FLAG_ESCAPED )) {
3378- VM_FORCE_WRITE (& prev_ep [VM_ENV_DATA_INDEX_ENV ], rb_gc_location (prev_ep [VM_ENV_DATA_INDEX_ENV ]));
3379- }
3370+ if (VM_FRAME_TYPE (cfp ) != VM_FRAME_MAGIC_DUMMY ) {
3371+ const VALUE * ep = cfp -> ep ;
3372+ cfp -> self = rb_gc_location (cfp -> self );
3373+ cfp -> iseq = (rb_iseq_t * )rb_gc_location ((VALUE )cfp -> iseq );
3374+ cfp -> block_code = (void * )rb_gc_location ((VALUE )cfp -> block_code );
3375+
3376+ if (!VM_ENV_LOCAL_P (ep )) {
3377+ const VALUE * prev_ep = VM_ENV_PREV_EP (ep );
3378+ if (VM_ENV_FLAGS (prev_ep , VM_ENV_FLAG_ESCAPED )) {
3379+ VM_FORCE_WRITE (& prev_ep [VM_ENV_DATA_INDEX_ENV ], rb_gc_location (prev_ep [VM_ENV_DATA_INDEX_ENV ]));
3380+ }
33803381
3381- if (VM_ENV_FLAGS (ep , VM_ENV_FLAG_ESCAPED )) {
3382- VM_FORCE_WRITE (& ep [VM_ENV_DATA_INDEX_ENV ], rb_gc_location (ep [VM_ENV_DATA_INDEX_ENV ]));
3383- VM_FORCE_WRITE (& ep [VM_ENV_DATA_INDEX_ME_CREF ], rb_gc_location (ep [VM_ENV_DATA_INDEX_ME_CREF ]));
3382+ if (VM_ENV_FLAGS (ep , VM_ENV_FLAG_ESCAPED )) {
3383+ VM_FORCE_WRITE (& ep [VM_ENV_DATA_INDEX_ENV ], rb_gc_location (ep [VM_ENV_DATA_INDEX_ENV ]));
3384+ VM_FORCE_WRITE (& ep [VM_ENV_DATA_INDEX_ME_CREF ], rb_gc_location (ep [VM_ENV_DATA_INDEX_ME_CREF ]));
3385+ }
33843386 }
33853387 }
33863388
0 commit comments