1.0.25.36: unblock signals on low level errors
authorGabor Melis <mega@hotpop.com>
Mon, 16 Feb 2009 21:56:20 +0000 (21:56 +0000)
committerGabor Melis <mega@hotpop.com>
Mon, 16 Feb 2009 21:56:20 +0000 (21:56 +0000)
commit8d2697777cef42c9611a015ee13292ca612b8f89
tree1d6745870bf402e06ad6e44484b479bd2ab3de19
parent89aafeff1876325edaacdd6b294e4ef065980bf2
1.0.25.36: unblock signals on low level errors

Low level errors (control stack exhausted, memory fault) may trigger
at inconvenient times such as in signal handlers still running with
deferrables blocked. Due to the condition handling mechanism this
leads to executing user code at unsafe places and the image may very
well become corrupted. To allow continuing anyway with fingers crossed
to diagnose the problem, deferrable and/or gc signals are unblocked
before arranging for returning to the Lisp function that signals the
appropriate condition. Before that is done, however, a warning is
fprintf'ed to stderr to that this important piece of information is
not lost in some generic condition handler (or in a interrupt handler
async unwinding before anyone gets a chance to handle the condition)
which makes diagnosis of subsequent problems very hard.

This was brought to light by the checks added in the previous commit.
src/code/target-signal.lisp
src/runtime/interrupt.c
src/runtime/interrupt.h
src/runtime/x86-64-darwin-os.c
src/runtime/x86-darwin-os.c
version.lisp-expr