Subject: Re: bug#77200: 31.0.50; Emacs sometimes crashes if several frames are present

From: Eli Zaretskii <[email-masked]>
Date: Sun, 23 Mar 2025 11:39:01 +0200

> From: Markus Triska <[email-masked]>
> Date: Sun, 23 Mar 2025 09:45:17 +0100
> 
> To reproduce this issue, please download several_frames_tty.el from:
> 
>     https://www.metalevel.at/ei/several_frames_tty.el
> 
> Then start Emacs with:
> 
>     $ emacs -Q -nw --load several_frames_tty.el
> 
> Leave it running for a bit, and then press:
> 
>     C-g C-x C-c
> 
> The expectation is that Emacs exits, and it works as expected in many
> cases. However, in some cases, I get:
> 
>     /lib/x86_64-linux-gnu/libc.so.6(+0x28150)[0x7deeafe28150]
>     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89)[0x7deeafe28209]
>     ./emacs(+0x3f5c5)[0x59a98895d5c5]
>     Segmentation fault (core dumped)
> 
> I attach the backtrace below.

I could only reproduce this once, and checked in a fix.  Please try
again with the current master branch.