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


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

From: martin rudalics <rudalics <at> gmx.at>
To: Michael Welsh Duggan <mwd <at> cert.org>
Cc: "mwd <at> md5i.com" <mwd <at> md5i.com>,
 "47244 <at> debbugs.gnu.org" <47244 <at> debbugs.gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
 "schwab <at> linux-m68k.org" <schwab <at> linux-m68k.org>
Subject: Re: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs
Date: Fri, 2 Apr 2021 08:48:35 +0200
[Message part 1 (text/plain, inline)]
> The answer, which I sort of suspected, is that it never hit that
> breakpoint at all before the assertion fires.

You're right.  In

+		if (!NILP (Fstring_equal (XBUFFER (w->contents)->name_,
+					  build_string ("*Server*"))))
+		  best_window = Qt;
+
 		/* Undedicate WINDOW.  */
 		wset_dedicated (w, Qnil);
 		/* Make WINDOW show the buffer returned by
@@ -3048,6 +3061,8 @@ window_loop (enum window_loop type, Lisp_Object obj, bool mini,
 		if (EQ (window, selected_window)
 		    && XBUFFER (w->contents) == current_buffer)
 		  Fset_buffer (w->contents);
+
+		replace_buffer_in_windows_safely_count += 1;

replace_buffer_in_windows_safely_count is incremented regardless of
whether W's buffer is *Server* or not.  In either case the assertion
would not fail.  So once we are here everything is all right and the bug
must be that we do not get here.  I attach the next patch.  Please put a
breakpoint at the

      replace_buffer_in_windows_safely_count = 0;

and try to step through the rest of this function with GDB.  And if you
don't hit it, the detection logic went wrong ...

martin
[selected_window_contents.diff (text/x-patch, attachment)]

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.