GNU bug report logs - #47244
28.0.50; SIGSEGV in long-runnning Emacs

Previous Next

Package: emacs;

Reported by: Michael Welsh Duggan <md5i <at> md5i.com>

Date: Thu, 18 Mar 2021 15:40:01 UTC

Severity: normal

Found in version 28.0.50

Done: Michael Welsh Duggan <mwd <at> md5i.com>

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: martin rudalics <rudalics <at> gmx.at>
Cc: mwd <at> md5i.com, 47244 <at> debbugs.gnu.org, schwab <at> linux-m68k.org, mwd <at> cert.org
Subject: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs
Date: Tue, 30 Mar 2021 18:13:29 +0300
> Cc: mwd <at> cert.org, mwd <at> md5i.com, schwab <at> linux-m68k.org, 47244 <at> debbugs.gnu.org
> From: martin rudalics <rudalics <at> gmx.at>
> Date: Tue, 30 Mar 2021 17:05:14 +0200
> 
>  > Maybe instead of trying to find the exact culprit, we should simply
>  > protect this code:
>  >
>  >        /* Make sure the current window's buffer is selected.  */
>  >        set_buffer_internal (XBUFFER (XWINDOW (selected_window)->contents));
>  >
>  > from selecting a dead buffer?  For example, by using
>  > other_buffer_safely if the selected-window's buffer is dead.
> 
> The problem is that we already detect this situation too late in order
> to tell who the real culprit is.  For example, a dead buffer stored in
> the selected_window's contents field could have been a dead
> current_buffer before.  So for some time we could have been already
> running with a dead buffer in that filed.  Long enough maybe to cause
> havoc elsewhere.  And what happened in between might not have used
> set_buffer_internal but accessed that buffer more directly.

The above code runs every iteration through the main loop, so fixing
it there will go along way towards avoiding the havoc.  Or are you
saying it could cause harm in some situation?




This bug report was last modified 4 years and 28 days ago.

Previous Next


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