bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33034: `unwind-protect' cleanup form is not executed if body dies in


From: Eli Zaretskii
Subject: bug#33034: `unwind-protect' cleanup form is not executed if body dies in stack overflow
Date: Sat, 13 Oct 2018 13:45:38 +0300

> From: Paul Pogonyshev <address@hidden>
> Date: Sat, 13 Oct 2018 12:35:46 +0200
> Cc: address@hidden
> 
> I see. Wonderful approach.

If you have ideas for better approaches, I'm sure they will be
welcome.

C stack overflow results in SIGSEGV; the current code attempts
recovery by using OS-dependent techniques that analyze the data
provided by the segfault to detect when it's a stack overflow, and if
so, do the moral equivalent of (throw 'top-level), bypassing any
possible unwind forms, because evaluating those forms when there is no
available stack space might very well trigger another, nested
segfault.

It's a hard problem, and the only justification for it is to give
users some imperfect chance of saving their edits.

Some people think we shouldn't even attempt to recover from such
calamities, and instead just crash, which is why we have the
attempt-stack-overflow-recovery variable to let those people have what
they want.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]