mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Keep GC disabled until VM bootstrap has done [Bug #17583]
This commit is contained in:
parent
1862d961a9
commit
8ebb5e23eb
Notes:
git
2021-07-02 10:49:44 +09:00
2 changed files with 5 additions and 3 deletions
|
@ -1146,7 +1146,9 @@ q.pop
|
|||
env = {}
|
||||
env['RUBY_THREAD_VM_STACK_SIZE'] = vm_stack_size.to_s if vm_stack_size
|
||||
env['RUBY_THREAD_MACHINE_STACK_SIZE'] = machine_stack_size.to_s if machine_stack_size
|
||||
out, = EnvUtil.invoke_ruby([env, '-e', script], '', true, true)
|
||||
out, err, status = EnvUtil.invoke_ruby([env, '-e', script], '', true, true)
|
||||
assert_not_predicate(status, :signaled?, err)
|
||||
|
||||
use_length ? out.length : out
|
||||
end
|
||||
|
||||
|
|
4
vm.c
4
vm.c
|
@ -3669,6 +3669,8 @@ Init_VM(void)
|
|||
* The Binding of the top level scope
|
||||
*/
|
||||
rb_define_global_const("TOPLEVEL_BINDING", rb_binding_new());
|
||||
|
||||
rb_objspace_gc_enable(vm->objspace);
|
||||
}
|
||||
vm_init_redefined_flag();
|
||||
|
||||
|
@ -3734,8 +3736,6 @@ Init_vm_objects(void)
|
|||
vm->mark_object_ary = rb_ary_tmp_new(128);
|
||||
vm->loading_table = st_init_strtable();
|
||||
vm->frozen_strings = st_init_table_with_size(&rb_fstring_hash_type, 10000);
|
||||
|
||||
rb_objspace_gc_enable(vm->objspace);
|
||||
}
|
||||
|
||||
/* top self */
|
||||
|
|
Loading…
Reference in a new issue