1
0
Fork 0
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:
Aaron Patterson 2020-10-01 18:13:26 -07:00
parent 8d76b729a1
commit 4b41ee154f
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

2
vm.c
View file

@ -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);
}