From 4b41ee154f117e18b54c7fb31574f2e314f10f15 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 1 Oct 2020 18:13:26 -0700 Subject: Update the thread's self / wrapper address Threads can move, and if they do, their self pointer may go bad. We need to update it. --- vm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 1b8b5483aa..9535205fb2 100644 --- a/vm.c +++ b/vm.c @@ -2660,6 +2660,8 @@ thread_compact(void *ptr) { rb_thread_t *th = ptr; + th->self = rb_gc_location(th->self); + if (!th->root_fiber) { rb_execution_context_update(th->ec); } -- cgit v1.2.3