summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-26 08:30:10 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-26 08:30:10 +0000
commit97538e813f8d41d7091aa6d1ffd15466117b26b1 (patch)
treefcebd0831122e048be356f6332a5a8bb00593617 /ruby.c
parentd3df0de693aefb942b7f38fa42854059d3cca14a (diff)
cont.c (ec_switch): prevent delayed/missed trap interrupt race
timer-thread may set trap interrupt with rb_threadptr_check_signal at any time independent of GVL. This means timer-thread may set the trap interrupt flag on the previous execution context; causing the flag to be unnoticed until a future ec switch (or lost completely if the ec is done). Note: I avoid relying on th->interrupt_lock here and use atomics because we won't be able to rely on it for proposed lazy timer-thread [Misc #14937]. This regression affects Ruby 2.5 as it was introduced by moving interrupt_flag to `ec' which is an unstable pointer. Ruby <= 2.4 was unaffected because vm->main_thread->interrupt_flag never changed. [ruby-core:88119] [Bug #14939] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
0 files changed, 0 insertions, 0 deletions