File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3192,9 +3192,14 @@ rb_gc_mark_children(void *objspace, VALUE obj)
31923192 if (fields_count ) {
31933193 VALUE klass = RBASIC_CLASS (obj );
31943194
3195- // Increment max_iv_count if applicable, used to determine size pool allocation
3196- if (RCLASS_MAX_IV_COUNT (klass ) < fields_count ) {
3197- RCLASS_WRITE_MAX_IV_COUNT (klass , fields_count );
3195+ // Skip updating max_iv_count if the prime classext is not writable
3196+ // because GC context doesn't provide information about namespaces.
3197+ if (RCLASS_PRIME_CLASSEXT_WRITABLE_P (klass )) {
3198+ VM_ASSERT (rb_shape_obj_too_complex_p (klass ));
3199+ // Increment max_iv_count if applicable, used to determine size pool allocation
3200+ if (RCLASS_MAX_IV_COUNT (klass ) < fields_count ) {
3201+ RCLASS_SET_MAX_IV_COUNT (klass , fields_count );
3202+ }
31983203 }
31993204 }
32003205
You can’t perform that action at this time.
0 commit comments