Don't scrub the C stack from C.
authorAlastair Bridgewater <nyef@kana.lisphacker.com>
Fri, 11 Nov 2011 14:00:46 +0000 (09:00 -0500)
committerAlastair Bridgewater <nyef@virtdev-1.lisphacker.com>
Sun, 27 Nov 2011 00:32:21 +0000 (19:32 -0500)
commit0a2d9c98c53cfe7b3874ca96b11dd629a360aa42
tree8031f5b3f5bf65cbb0de8d5ea2947f4bb55dba7e
parent0dda5090b6c16a641000b4eb2dcd479f39b784ca
Don't scrub the C stack from C.

  * The C version of the stack scrubber was picking an address to
start scrubbing by taking the address of a variable in the current
stack frame and subtracting one, clearly dependent on the frame
layout supplied by the compiler.

  * Fix, by rewriting the stack scrubber in assembly when
LISP_FEATURE_C_STACK_IS_CONTROL_STACK.  This way, we know what the
stack frame layout is, and don't have to worry about red zones and
other such compiler-dependent noise.

  * Lightly tested on linux/x86, linux/x86-64, darwin/x86, and
darwin/x86-64.
src/runtime/gc-common.c
src/runtime/x86-64-assem.S
src/runtime/x86-assem.S