Subject: bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related)

From: Eli Zaretskii <[email-masked]>
Date: Tue, 11 May 2021 15:21:50 +0300

> From: Alex Bennée <[email-masked]>
> Date: Tue, 11 May 2021 07:51:20 +0100
> Cc: [email-masked], Alan Mackenzie <[email-masked]>
> 
> I can now recreate at will with a magit sequence (l o hackbox/ TAB) which triggers a minibuffer re-size to
> accommodate the list of git branches:
> 
> (gdb) info frame 0
> Stack frame at 0x7fffffffb2e0:
>  rip = 0x5555556a80ef in Factive_minibuffer_window (minibuf.c:230); saved rip = 0x5555556f52ab
>  called by frame at 0x7fffffffb340
>  source language c.
>  Arglist at 0x7fffffffb2c8, args:
>  Locals at 0x7fffffffb2c8, Previous frame's sp is 0x7fffffffb2e0
>  Saved registers:
>   rip at 0x7fffffffb2d8
> (gdb) x/5i $pc
> => 0x5555556a80ef <Factive_minibuffer_window+79>:       mov    -0x3(%rax),%r10
>    0x5555556a80f3 <Factive_minibuffer_window+83>:       lea    -0x3(%rdx),%eax
>    0x5555556a80f6 <Factive_minibuffer_window+86>:       test   $0x7,%al
>    0x5555556a80f8 <Factive_minibuffer_window+88>:       jne    0x5555556a8153
> <Factive_minibuffer_window+179>
>    0x5555556a80fa <Factive_minibuffer_window+90>:       nopw   0x0(%rax,%rax,1)
> (gdb) p/x $rax
> $4 = 0x0
> (gdb) p/x $r10
> $5 = 0x7fffeece9c6d
> (gdb) l
> 225       Lisp_Object innermost_MB;
> 226
> 227       if (!minibuf_level)
> 228         return Qnil;
> 229
> 230       innermost_MB = nth_minibuffer (minibuf_level);
> 231       FOR_EACH_FRAME (frames, frame)
> 232         {
> 233           f = XFRAME (frame);
> 234           if (FRAME_LIVE_P (f)
> (gdb) p minibuf_level
> $6 = 2
> (gdb) p Vminibuffer_list
> $7 = (Lisp_Object) 0x555555c9aca3
> (gdb) p $*
> A syntax error in expression, near `'.
> (gdb) p *$
> $8 = <incomplete type>
> (gdb)
> 
> Let me know if you want something else.

I want this:

  (gdb) pp Vminibuffer_list

If GDB says it doesn't know "pp", you need to source the .gdbinit file
in the Emacs's src directory.

Thanks.