Subject: Re: bug#45277: SELECTION_CLEAR_EVENT crashes

From: Juri Linkov <[email-masked]>
Date: Wed, 06 Jan 2021 19:37:18 +0200

retitle 45277 SELECTION_CLEAR_EVENT crashes
quit

>> Thanks for the help offer.  I see no more crashes even
>> without making bootstrap, so can't find an explanation.
>
> I've just pushed a change to dbusbind.c because of another
> error. Although I don't see a coincidence with your problem, it might be
> worth to pull and compile Emacs (no bootstrap).

After a week of calm, the crashes returned, but now with
a breakpoint in kbd_buffer_store_buffered_event, it revealed
that after copying a text to the clipboard outside of Emacs
causes the broken event SELECTION_CLEAR_EVENT to be added to the
kbd queue.  Sometimes the event kind becomes 11, sometimes 27.
Their binary representations:

#b01011 => 11 (SELECTION_CLEAR_EVENT)
#b11011 => 27 (DBUS_EVENT)
   ====
Note that their suffixes are the same "1011",
and only the leading bit differs.

Looks like a bit flip that means a faulty memory.
Maybe I should acquire ECC memory as Linus suggested
https://www.realworldtech.com/forum/?threadid=198497&curpostid=198647