mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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.
This commit is contained in:
parent
8d76b729a1
commit
4b41ee154f
1 changed files with 2 additions and 0 deletions
2
vm.c
2
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue