alternate stacks for signal handlers

Matthew Fluet fluet@research.nj.nec.com
Thu, 27 Jul 2000 09:23:51 -0400 (EDT)


That's really unfortunate the way that Linux handles alternate signal
stacks.  I'll set up the register allocator so that %esp always
corresponds to either the C-stack or to gcState.frontier.  I'm going to
arrange it as follows: on entry to a block, %esp will be gcState.frontier.
At the first C-call, %esp will be the C-stack.  On return from the C-call,
%esp will continue to correspond to the C-stack (so a subsequent C-call
doesn't incur the overhead of reloading the C-stack).  At the end of the
block, %esp will be forced to correspond to gcState.frontier (which will
do nothing if it never got bumped for a C-call).  I think that should
solve the general problem.  We lose out a little bit if we need
gcState.frontier sometime after a C-call, but that should be o.k.