[ruby-cvs:72099] nagachika:r64999 (ruby_2_5): merge revision(s) 64062: [Backport #14939]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Thu Oct 11 23:58:30 JST 2018

nagachika	2018-10-11 23:58:30 +0900 (Thu, 11 Oct 2018)

  New Revision: 64999


    merge revision(s) 64062: [Backport #14939]
    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
    [ruby-core:88119] [Bug #14939]

  Modified directories:
  Modified files:

More information about the ruby-cvs mailing list