diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2020-10-01 18:13:26 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2020-10-01 18:14:43 -0700 |
commit | 4b41ee154f117e18b54c7fb31574f2e314f10f15 (patch) | |
tree | e942c648b928b385cf8c01bcafa69702de80a801 /vm.c | |
parent | 8d76b729a180c47d8edf4392d84a02ec00aeb37b (diff) |
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.
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } |