"Nikodemus Siivola" <nikodemus@...> writes:
> "Now that I think of it, it's actually simple."
> *GC-PENDING* is global (shared between all threads. If the dying thread
> receives an interrupt in the window between unwinding the lisp stack (and
> losing *CURRENT-THREAD*) and blocking all threads, the interrupt handler
> will notice the pending GC and go for it.
> I'll need to check the details (most signals should be blocked
> before we stop running lisp), but if I'm on the right track, then
> the answer is to block all blockable signals before unwinding the
> lisp stack. I'll test this later today.
We already block all deferrable signals, so the only extra signal that
would be blocked would be SIG_STOP_FOR_GC. I haven't looked at the
details either, but if stopping the world would cause one of the
stopped threads to trigger a separate GC that seems like a bug. So
blocking all blockables instead of just deferrables doesn't seem like
the right solution either.