mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Don't clear cfp, it causes problems.
This commit is contained in:
parent
15c4f6aed2
commit
7d9d1ed463
2 changed files with 3 additions and 6 deletions
7
thread.c
7
thread.c
|
@ -599,11 +599,8 @@ thread_cleanup_func_before_exec(void *th_ptr)
|
||||||
// The thread stack doesn't exist in the forked process:
|
// The thread stack doesn't exist in the forked process:
|
||||||
th->ec->machine.stack_start = th->ec->machine.stack_end = NULL;
|
th->ec->machine.stack_start = th->ec->machine.stack_end = NULL;
|
||||||
|
|
||||||
// Appears to be causing a lot of issues.
|
// The vm_stack is `alloca`ed on the thread stack, so it's gone too:
|
||||||
if (0) {
|
rb_ec_clear_vm_stack(th->ec);
|
||||||
// The vm_stack is `alloca`ed on the thread stack, so it's gone too:
|
|
||||||
rb_ec_clear_vm_stack(th->ec);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
2
vm.c
2
vm.c
|
@ -2714,7 +2714,7 @@ rb_ec_clear_vm_stack(rb_execution_context_t *ec)
|
||||||
rb_ec_set_vm_stack(ec, NULL, 0);
|
rb_ec_set_vm_stack(ec, NULL, 0);
|
||||||
|
|
||||||
// Avoid dangling pointers:
|
// Avoid dangling pointers:
|
||||||
ec->cfp = NULL;
|
// ec->cfp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue