GNU bug report logs - #33034
`unwind-protect' cleanup form is not executed if body dies in stack overflow

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Sat, 13 Oct 2018 10:09:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 33034 <at> debbugs.gnu.org
Subject: bug#33034: `unwind-protect' cleanup form is not executed if body dies in stack overflow
Date: Sat, 13 Oct 2018 13:29:13 +0300
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Sat, 13 Oct 2018 12:07:48 +0200
> 
> To reproduce:
> 
>     (defun overflow ()
>       (overflow))
>     (defun test ()
>       (interactive)
>       (message "BEFORE")
>       (unwind-protect
>           (overflow)
>         (message "CLEANUP")))
> 
> Invocation of `test' never issues message "CLEANUP", whether it is run
> interactively or non-interactively.

You are not supposed to continue using Emacs as usual after it
recovered from a C stack overflow.  You are supposed to exit Emacs and
restart the session.

The C stack overflow recovery is provided to allow you to save your
edits instead of losing them.

P.S.  I was somehow certain that we say the above somewhere in the
docs, but I cannot find it, so maybe I was dreaming.  Patches to add
that are welcome.




This bug report was last modified 6 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.