bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs


From: martin rudalics
Subject: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs
Date: Fri, 2 Apr 2021 08:48:35 +0200

> 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

Attachment: selected_window_contents.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]