Subject: Re: 30.0.50; cmcheckmagic aborts when tty_write_glyphs writes "Garbage collecting..." in some cases

From: Eli Zaretskii <[email-masked]>
Date: Wed, 05 Jun 2024 18:06:49 +0300

> From: Daniel Clemente <[email-masked]>
> Date: Wed, 5 Jun 2024 13:50:48 +0000
> Cc: [email-masked]
> 
> With it (running on 799f78a92c6c31f4d181390523b83d036020ede1 with no
> other changes), I still see the same types of crash that I already
> reported: in tty_write_glyphs (see BT1 below) and in
> build_frame_matrix_from_leaf_window (see BT2 below).
> However they don't mention GC now.

So it is not exactly the same type of crash.

In what scenario does this happen now?  IOW, what did you do to
trigger those crashes?

I'd like to ask you to run that scenario with a watchpoint on the
variable delayed_size_change, and the following two watchpoint
commands:

  bt 5
  continue

I hope the backtraces produced by this will explain who resets the
delayed_size_change flag, seemingly prematurely(?), and might suggest
ideas for a solution.  (I have an idea already, but would like to see
some data to make sure the idea is solid.)

It is best to run GDB in a separate terminal for this experiment.
IOW, start Emacs, attach GDB to it from another terminal, say "set
height 0" to let GDB scroll the output freely, then set up the
watchpoint with the commands, and run Emacs with your recipe.

Thanks.