Fix symbol-value-in-thread GC race condition.
authorAlastair Bridgewater <nyef@arisu.lisphacker.com>
Tue, 22 Nov 2011 18:44:06 +0000 (13:44 -0500)
committerAlastair Bridgewater <nyef@arisu.lisphacker.com>
Tue, 22 Nov 2011 19:19:27 +0000 (14:19 -0500)
commitd6e6a3798dc767045cd7495f483bd4d0b6250d00
tree9130a2d8c3c357f83029ddfd001e7dce968eca63
parent179812c3ad5dad69239c625ec929a7d486cf568f
Fix symbol-value-in-thread GC race condition.

  * SVIT was using SAP-REF-WORD and MAKE-LISP-OBJ while the GC was
enabled, which is mostly-safe on x86oids, but technically breaks
the consistency rules for the GC.  Failures due to badly-timed GC
(well-timed GC?) have been observed on PPC.

  * Instead of SAP-REF-WORD, checking for specific tags, then
using MAKE-LISP-OBJ and checking for validity and GC epoch, which
is a badly-broken approach, use SAP-REF-LISPOBJ to obtain the
value and then check the tags with GET-LISP-OBJ-ADDRESS, a far
safer approach, with lower overhead, and not subject to random GC
lossage.
NEWS
src/code/target-thread.lisp