Subject: Re: bug#33294: xwidget-insert crashes Emacs

From: Eli Zaretskii <[email-masked]>
Date: Thu, 08 Nov 2018 20:47:05 +0200

> From: Robert Pluim <[email-masked]>
> Cc: Evgeny Zajcev <[email-masked]>,  Gemini Lasswell <[email-masked]>,  [email-masked], Stefan Monnier <[email-masked]>
> Date: Thu, 08 Nov 2018 17:21:45 +0100
> 
> (gdb) pp argvals[0]
> [Thread 0x7fff8a990700 (LWP 7812) exited]
> [New Thread 0x7fff8a990700 (LWP 7850)]
> [New Thread 0x7fff8a18f700 (LWP 7851)]
> #<xwidget >
> (gdb) p XTYPE(argvals[0])
> $1 = Lisp_Vectorlike
> (gdb) p PSEUDOVECTOR_TYPE (XVECTOR (argvals[0]))
> $2 = PVEC_XWIDGET
> 
> And type-of explicitly calls abort for that tag:
> 
>         /* "Impossible" cases.  */
> 	case PVEC_MISC_PTR:
>         case PVEC_XWIDGET:
>         case PVEC_OTHER:
>         case PVEC_XWIDGET_VIEW:
>         case PVEC_SUB_CHAR_TABLE:
>         case PVEC_FREE: ;
>         }
>       emacs_abort ();
> 
> which Stefan added in 1b424533675341a2090b79a6ffc420ac6b179ce7

I admit I don't understand why PVEC_XWIDGET and PVEC_XWIDGET_VIEW are
in the "impossible" cases.  They are first-class Lisp objects, AFAICT.