1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Basic assertions for thread initialization.

This commit is contained in:
Samuel Williams 2019-06-06 09:54:07 +12:00
parent 8121a523c3
commit 5855af73b8

4
vm.c
View file

@ -2704,6 +2704,10 @@ th_init(rb_thread_t *th, VALUE self)
0 /* dummy cref/me */,
0 /* dummy pc */, th->ec->vm_stack, 0, 0
);
} else {
VM_ASSERT(th->ec->cfp == NULL);
VM_ASSERT(th->ec->vm_stack == NULL);
VM_ASSERT(th->ec->vm_stack_size == 0);
}
th->status = THREAD_RUNNABLE;