https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423
--- Comment #17 from Sam James <sjames at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #15) > The odd thing is this has been an issue for the last 5 years now, did Emacs > code change recently to expose this issue? I think it is a combination of: * the structure of the pgtk code * the fact that pgtk is becoming more popular (without it, Emacs doesn't run natively under Wayland) * https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76559#5 mentions a commit that made it happen more The selection_input_event struct contains a dpyinfo pointer (which is what SRA mangles) and it appears in a bunch of places. Then if you look at the newer bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78473, that is on an experimental branch which adds a new form of GC (not merged in master) So I think it's bad luck combined with it appearing in a struct that's passed around often