Free shapes last
[Bug #21352] `rb_objspace_free_objects` may need to check objects shapes to know how to free them.
This commit is contained in:
parent
40c957ba21
commit
83d636f2d0
7
vm.c
7
vm.c
@ -3162,8 +3162,6 @@ ruby_vm_destruct(rb_vm_t *vm)
|
|||||||
// TODO: Is this ignorable for classext->m_tbl ?
|
// TODO: Is this ignorable for classext->m_tbl ?
|
||||||
// rb_id_table_free(RCLASS(rb_mRubyVMFrozenCore)->m_tbl);
|
// rb_id_table_free(RCLASS(rb_mRubyVMFrozenCore)->m_tbl);
|
||||||
|
|
||||||
rb_shape_free_all();
|
|
||||||
|
|
||||||
st_free_table(vm->static_ext_inits);
|
st_free_table(vm->static_ext_inits);
|
||||||
|
|
||||||
rb_vm_postponed_job_free();
|
rb_vm_postponed_job_free();
|
||||||
@ -3222,11 +3220,12 @@ ruby_vm_destruct(rb_vm_t *vm)
|
|||||||
ruby_mimfree(vm);
|
ruby_mimfree(vm);
|
||||||
ruby_current_vm_ptr = NULL;
|
ruby_current_vm_ptr = NULL;
|
||||||
|
|
||||||
#if USE_YJIT
|
|
||||||
if (rb_free_at_exit) {
|
if (rb_free_at_exit) {
|
||||||
|
rb_shape_free_all();
|
||||||
|
#if USE_YJIT
|
||||||
rb_yjit_free_at_exit();
|
rb_yjit_free_at_exit();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RUBY_FREE_LEAVE("vm");
|
RUBY_FREE_LEAVE("vm");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user