More unboxed-byte-addresses-are-word-addresses damage.
authorAlastair Bridgewater <nyef@virtdev-1.lisphacker.com>
Sun, 9 Oct 2011 21:06:28 +0000 (17:06 -0400)
committerAlastair Bridgewater <nyef@virtdev-1.lisphacker.com>
Thu, 20 Oct 2011 14:44:08 +0000 (10:44 -0400)
commit357b030149015c45e007797517a8461924bb8c88
tree576afa34382f86d9938d4bfd566925e5c22e5ca1
parenta369686d65039bc87497039ac4db6c4c7c44f443
More unboxed-byte-addresses-are-word-addresses damage.

  * In the binding stack tests, the binding stack pointer is altered
by adding two to SB-VM::*BINDING-STACK-POINTER*.  This "works" when
n-fixnum-tag-bits is equal to word-shift, but is badly wrong when
they differ.

  * Fixed by adding a variable to hold the actual delta required,
based on the difference between n-fixnum-tag-bits and word-shift.

  * Incidentally, how on earth does this test work on threaded PPC?
PPC has the BSP in a register, not a variable, and there are no
memory barriers around the synchronization for GCs.  How does the
(incf sb-vm::*binding-stack-pointer*) not die from an unbound
symbol?  And, really, it looks like it doesn't matter if a thread
dies or lands in the debugger: If the process doesn't die screaming,
the test always passes, even if it only does a single GC.

  * And, while we're on the topic, how on earth does this test work
on x86?  The memory-barrier argument should apply there as well.
Wait, I know!  The CPU still gets timer interrupts, and the kernel
effectively provides a barrier then.  And the "it doesn't matter"
argument also applies here: If it doesn't deadlock the system
completely, the main thread will kill everything off and call it a
success after four seconds anyway.
tests/threads.impure.lisp