Subject: bug#63614: 29.0.91; PGTK Emacs crashes after clearing the clipboard

From: Po Lu <[email-masked]>
Date: Mon, 22 May 2023 09:11:52 +0800

Leonardo Hernández <[email-masked]> writes:

> (event=0x7fff20369bc0) at pgtkselect.c:782
> event = 0x563f071d44a0 <kbd_buffer+1344>
> copy = {kind = SELECTION_CLEAR_EVENT, dpyinfo = 0x90c1b80, requestor = 
> 0x0, selection = 0x45, target = 0x0, property = 0x0, time = 0}
> moved_events = <optimized out>
> #10 process_special_events () at keyboard.c:4449
> event = 0x563f071d44a0 <kbd_buffer+1344>
> copy = {kind = SELECTION_CLEAR_EVENT, dpyinfo = 0x90c1b80, requestor = 
> 0x0, selection = 0x45, target = 0x0, property = 0x0, time = 0}
> moved_events = <optimized out>
> #11 0x0000563f06a9b7cd in swallow_events (do_display=true) at 
> keyboard.c:4489
> old_timers_run = <optimized out>

If I'm not mistaken, what seems to be shown is that an invalid selection
event somehow ended up in the keyboard buffer, to be processed by
process_special_events.  Possibly, one such event was processed earlier,
but not correctly removed from the keyboard buffer.

What is:

  (gdb) p kbd_buffer[1344].sie

?