Micha Nelissen wrote 5 lines
SignalToRunError is a signal handler, but it calls an ErrorProc
calling
many functions, like CRelocateThreadVar (for accessing the exception
stack), GetMem (to allocate an exception object); are these functions
guaranteed to run correctly in a signal handler ?
Probably not. For darwin/ppc, I actually do it differently (for another reason, but that's not relevant here): I change the signal context to return to HandleErrorAddrFrame, putting the required parameters (runerror number, program counter/instruction pointer, stack pointer) in the parameter registers of the context.
Since there are only 3 parameters, it should be possible to do this even on i386.
Jonas