GNU bug report logs - #11984
24.1; segfault while deleting a window

Previous Next

Package: emacs;

Reported by: Russell Sim <russell.sim <at> gmail.com>

Date: Thu, 19 Jul 2012 02:17:01 UTC

Severity: normal

Merged with 12175

Found in version 24.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Chong Yidong <cyd <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Russell Sim <russell.sim <at> gmail.com>, 11984 <at> debbugs.gnu.org
Subject: bug#11984: 24.1; segfault while deleting a window
Date: Sat, 21 Jul 2012 13:03:24 +0200
>>> But for long-term safety, I think
>>> decode_any_windows had better signal an error if the window's frame
>>> isn't live.  But I'm not sure if there's any subtle reliance in existing
>>> code on allowing window functions to be called for windows on dead
>>> frames---anyone know?
>> Maybe the best way to find out is to install such a change?
>
> Done in the trunk.

I must admit that I never looked at the definition of decode_any_window.
I always assumed that it _does_ check whether the window either has a
buffer or is in a window tree.  So I think behavior is still broken
because a window can have been deleted while its frame is still alive.

IMHO the right fix is to throw an error for

  if (NILP (w->buffer) && NILP (w->hchild) && NILP (w->vchild))

which means that some functions when called on dead windows (like
`delete-window') will now throw an error.  These will have to be caught
on the Elisp level.

martin




This bug report was last modified 12 years and 282 days ago.

Previous Next


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