aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-20 14:55:43 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-20 14:55:43 +1200
commit7d9d1ed463323fe28f24d0b94212c2cb7ad109bd (patch)
tree1277c90481a69def2ded9c80c26d97d76d793d9e
parent15c4f6aed29b4f9f8d2c911548ac87756239b592 (diff)
downloadruby-7d9d1ed463323fe28f24d0b94212c2cb7ad109bd.tar.gz
Don't clear cfp, it causes problems.
-rw-r--r--thread.c7
-rw-r--r--vm.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/thread.c b/thread.c
index df583266eb..8953c270bb 100644
--- a/thread.c
+++ b/thread.c
@@ -599,11 +599,8 @@ thread_cleanup_func_before_exec(void *th_ptr)
// The thread stack doesn't exist in the forked process:
th->ec->machine.stack_start = th->ec->machine.stack_end = NULL;
- // Appears to be causing a lot of issues.
- if (0) {
- // The vm_stack is `alloca`ed on the thread stack, so it's gone too:
- 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
diff --git a/vm.c b/vm.c
index 495d5ddcb6..7ad6bdd264 100644
--- a/vm.c
+++ b/vm.c
@@ -2714,7 +2714,7 @@ rb_ec_clear_vm_stack(rb_execution_context_t *ec)
rb_ec_set_vm_stack(ec, NULL, 0);
// Avoid dangling pointers:
- ec->cfp = NULL;
+ // ec->cfp = NULL;
}
static void