ruby-changes:63253
From: Aaron <ko1@a...>
Date: Fri, 2 Oct 2020 10:15:09 +0900 (JST)
Subject: [ruby-changes:63253] 4b41ee154f (master): Update the thread's self / wrapper address
https://git.ruby-lang.org/ruby.git/commit/?id=4b41ee154f From 4b41ee154f117e18b54c7fb31574f2e314f10f15 Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> 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. diff --git a/vm.c b/vm.c index 1b8b548..9535205 100644 --- a/vm.c +++ b/vm.c @@ -2660,6 +2660,8 @@ thread_compact(void *ptr) https://github.com/ruby/ruby/blob/trunk/vm.c#L2660 { rb_thread_t *th = ptr; + th->self = rb_gc_location(th->self); + if (!th->root_fiber) { rb_execution_context_update(th->ec); } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/