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


Message #29 received at 33034 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 33034 <at> debbugs.gnu.org
Subject: Re: bug#33034: `unwind-protect' cleanup form is not executed if body
 dies in stack overflow
Date: Sat, 13 Oct 2018 15:35:34 +0300
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Sat, 13 Oct 2018 13:38:11 +0200
> Cc: 33034 <at> debbugs.gnu.org
> 
> OK, but why does it hit the limit? Logically, by the time cleanup form
> is called, all the (overflow) stack frames should be removed and the
> cleanup form should see practically empty stack. It shouldn't be much
> different from calling cleanup without overflowing the stack to begin
> with.

I don't think your expectation, that the stack should be unwound
before the cleanup runs, is correct.  The implementation calls the
cleanup forms before it jumps to top-level, and I see nothing in the
documentation to promise anything different.




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.