File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -974,9 +974,12 @@ static inline void
974974gc_validate_pc (VALUE obj )
975975{
976976#if RUBY_DEBUG
977+ // IMEMOs and objects without a class (e.g managed id table) are not traceable
978+ if (RB_TYPE_P (obj , T_IMEMO ) || !CLASS_OF (obj )) return ;
979+
977980 rb_execution_context_t * ec = GET_EC ();
978981 const rb_control_frame_t * cfp = ec -> cfp ;
979- if (! RB_TYPE_P ( obj , T_IMEMO ) && cfp && VM_FRAME_RUBYFRAME_P (cfp ) && cfp -> pc ) {
982+ if (cfp && VM_FRAME_RUBYFRAME_P (cfp ) && cfp -> pc ) {
980983 const VALUE * iseq_encoded = ISEQ_BODY (cfp -> iseq )-> iseq_encoded ;
981984 const VALUE * iseq_encoded_end = iseq_encoded + ISEQ_BODY (cfp -> iseq )-> iseq_size ;
982985 RUBY_ASSERT (cfp -> pc >= iseq_encoded , "PC not set when allocating, breaking tracing" );
You can’t perform that action at this time.
0 commit comments