On 01/04/2016 07:24 AM, Eli Zaretskii wrote: >> From: Daniel Colascione >> Date: Sun, 3 Jan 2016 13:12:29 -0800 >> >>> I think something along that lines would suffice, yes. Admittedly I >>> didn't quite follow what you wrote (perhaps some text got elided?). But >>> the main point, as I understand it, is that we needn't worry about >>> having a stack-overflow check inside the stack-overflow handler, because >>> we can insist that the stack-overflow handler be tightly-enough >>> controlled so that it won't recurse indefinitely. >> >> Yes: do as little as possible in the segfault handler and signal an >> error the normal way at the next safe opportunity, if one arises before >> we fully exhaust the stack. > > You cannot do that when the stack is exhausted. You will almost > certainly crash if you try. That's why we have the alternate signal stack.