1.0.26.17: fix GC/SIG_STOP_FOR_GC race
authorGabor Melis <mega@hotpop.com>
Sun, 22 Mar 2009 22:06:03 +0000 (22:06 +0000)
committerGabor Melis <mega@hotpop.com>
Sun, 22 Mar 2009 22:06:03 +0000 (22:06 +0000)
commitce73c961ea089afea8ec523e1a5556c27d1aa6d2
treeca38593eba07274a3e3694e4d182d064a3fd6f3d
parent7a0ba26f6a662f592b168353c135204f65fda2d2
1.0.26.17: fix GC/SIG_STOP_FOR_GC race

Consider this: in a PA section GC is requested: GC_PENDING,
pseudo_atomic_interrupted and gc_blocked_deferrables are set,
deferrables are blocked then pseudo_atomic_atomic is cleared, but a
SIG_STOP_FOR_GC arrives before trapping to interrupt_handle_pending.
In sig_stop_for_gc_handler, GC_PENDING is cleared but
pseudo_atomic_interrupted is not and we go on running with
pseudo_atomic_interrupted but without a pending interrupt or GC.
GC_BLOCKED_DEFERRABLES is also left at 1.

Add more checks, fix comments.
NEWS
src/runtime/alloc.c
src/runtime/backtrace.c
src/runtime/dynbind.c
src/runtime/interrupt.c
src/runtime/interrupt.h
version.lisp-expr