Subject: bug#76559: 31.0.50; [-O3 + PGTK] Crash when 'copying as kill'/'killing word'

From: Iurie Marian <[email-masked]>
Date: Wed, 26 Feb 2025 17:03:29 +0100

`dpyinfo` is actually invalid...

(gdb) p *event
$3 = {kind = SELECTION_REQUEST_EVENT, dpyinfo = 0x55c83670, requestor
= 0x555556035a80, selection = 0x45, target = 0x4d, property = 0x60,
time = 0}

(gdb) p *event->dpyinfo
Cannot access memory at address 0x55c83670

(gdb) x/s 0x55c83670
0x55c83670:     <error: Cannot access memory at address 0x55c83670>

(gdb) p event->dpyinfo->terminal
Cannot access memory at address 0x55c83678

On Wed, 26 Feb 2025 at 16:48, Eli Zaretskii <[email-masked]> wrote:
>
> > From: Iurie Marian <[email-masked]>
> > Date: Wed, 26 Feb 2025 14:43:20 +0100
> > Cc: Iurie Marian <[email-masked]>, [email-masked], [email-masked]
> >
> > > What does this produce:
> > >
> > >  (gdb) p *event
> >
> > (gdb) p *event
> > $1 = {kind = SELECTION_REQUEST_EVENT, ie = {kind =
> > SELECTION_REQUEST_EVENT, part = scroll_bar_nowhere, code = 0,
> > modifiers = 1439199584, x = 0x555555f95a80, y = 0x45, timestamp = 77,
> > frame_or_window = 0x5e, arg = 0x0, device = 0x30}, sie = {kind =
> > SELECTION_REQUEST_EVENT, dpyinfo = 0x55c87160, requestor =
> > 0x555555f95a80, selection = 0x45, target = 0x4d, property = 0x5e, time
> > = 0}}
>
> And this:
>
>  (gdb) p event->dpyinfo->terminal
>  (gdb) p event->dpyinfo->terminal->Vselection_list