Subject: Re: bug#77024: 31.0.50; feature/igc: crash "switching to thread"

From: Eli Zaretskii <[email-masked]>
Date: Sat, 15 Mar 2025 12:27:53 +0200

> From: Oliver Reiter <[email-masked]>
> Date: Fri, 14 Mar 2025 21:34:32 +0100
> 
> After weeks of no crash, emacs crashed on me today again.
> 
> [New Thread 0x7fffb3bb96c0 (LWP 54691)]
> [Thread 0x7fffb3bb96c0 (LWP 54691) exited]
> ... quite a lot of those
> [New Thread 0x7fffb3bb96c0 (LWP 54696)]
> [Thread 0x7fffb3bb96c0 (LWP 54696) exited]
> [New Thread 0x7fffb3bb96c0 (LWP 54709)]
> [Thread 0x7fffb3bb96c0 (LWP 54709) exited]
> [New Thread 0x7fffb3bb96c0 (LWP 54751)]
> [Switching to Thread 0x7fffb3bb96c0 (LWP 54751)]
> 
> Thread 409 "diff-hl--update" hit Breakpoint 1, terminate_due_to_signal (sig=6, backtrace_limit=40) at /home/reitero/build/sources/emacs/emacs_debug/src/emacs.c:425
> 425	{
> (gdb) bt
> #0  terminate_due_to_signal (sig=6, backtrace_limit=40) at /home/reitero/build/sources/emacs/emacs_debug/src/emacs.c:425
> #1  0x00005555556d31a5 in emacs_abort () at /home/reitero/build/sources/emacs/emacs_debug/src/sysdep.c:2378
> #2  0x000055555579fa76 in fix_lisp_obj (ss=ss@entry=0x7fffb3bb81a8, pobj=pobj@entry=0x555556f67eb0) at /home/reitero/build/sources/emacs/emacs_debug/src/igc.c:1132

This is here:

    mps_word_t tag = word & IGC_TAG_MASK;
    if (tag == Lisp_Int0 || tag == Lisp_Int1)
      return MPS_RES_OK;
    else if (tag == Lisp_Type_Unused0)
      emacs_abort ();  <<<<<<<<<<<<<<<<<<<<<<<<<<

Called from here:

	  case SPECPDL_UNWIND:
	    IGC_FIX12_OBJ (ss, &pdl->unwind.arg);
	    break;

Can you show the contents of 'pdl' here?