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

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

bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer ac


From: Eli Zaretskii
Subject: bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related)
Date: Tue, 11 May 2021 16:42:26 +0300

> From: Alex Bennée <alex.bennee@linaro.org>
> Date: Tue, 11 May 2021 13:54:02 +0100
> Cc: 48337@debbugs.gnu.org, Alan Mackenzie <acm@muc.de>
> 
> (gdb) pp Vminibuffer_list
> (#<buffer  *Minibuf-0*> #<buffer  *Minibuf-1*>)

Thanks.

Alan, the code in nth_minibuffer and its callers is unsafe.  First,
Fnthcdr can return nil, and then XCAR of that in nth_minibuffer
crashes.  I fixed that now on the master branch, but there're more
problems: some the callers of nth_minibuffer don't seem to be
protected from it returning nil.  For example, we have this in
read_minibuf_unwind:

  Fset_buffer (nth_minibuffer (minibuf_level));

and this in minibuffer_unwind:

        set_window_buffer (window, nth_minibuffer (0), 0, 0);

In other cases you compare windows with nil, which can never be true,
so a preliminary test for nil would be nice to avoid a loop that can
never find anything useful.

Please make this code more robust.

Thanks.





reply via email to

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