Subject: Re: bug#63711: 30.0.50; Crash in xdisp.c when it->string is 0x0

From: Eli Zaretskii <[email-masked]>
Date: Thu, 25 May 2023 10:34:02 +0300

> From: Thomas Fitzsimmons <[email-masked]>
> Date: Thu, 25 May 2023 02:27:19 -0400
> 
> I have been having long-running Emacs sessions crash, rarely, and I
> finally caught one case in GDB.  Full backtraces attached.  I don't know
> how it->string becomes 0x0, but it looks like SCHARS (it->string) then
> attempts to dereference the null pointer.  I'll keep the session running
> in case there is anything else someone wants me to check.

Thanks, but with an optimized build and without a recipe to reproduce
this, it will be hard to debug this.  Still, I ask you below to
produce some values from GDB in the hope that this would give some
ideas.

  (gdb) p pos->overlay_string_index
  (gdb) p it->current.overlay_string_index
  (gdb) p it->sp
  (gdb) p it->method
  (gdb) p it->string
  (gdb) xtype

If GDB says that the last command "xtype" is not known, type:

  (gdb) source /path/to/emacs/src/.gdbinit
  (gdb) p it->string
  (gdb) xtype