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

Previous Next

Package: emacs;

Reported by: Iurie Marian <marian.iurie <at> gmail.com>

Date: Tue, 25 Feb 2025 17:34:01 UTC

Severity: normal

Merged with 76729

Found in version 31.0.50

Full log


Message #65 received at 76559 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Michael Albinus <michael.albinus <at> gmx.de>,
 Iurie Marian <marian.iurie <at> gmail.com>, 76559 <at> debbugs.gnu.org
Subject: Re: bug#76559: 31.0.50;
 [-O3 + PGTK] Crash when 'copying as kill'/'killing word'
Date: Thu, 27 Feb 2025 12:04:22 +0000
"Po Lu" <luangruo <at> yahoo.com> writes:

> Po Lu <luangruo <at> yahoo.com> writes:
>
>> In a word, tampering with optimizer options is tantamount to playing
>> with fire.  Don't do it, if your object is a functioning Emacs.
>
> Which, if it wasn't apparent, belies my earlier theory respecting what
> would be reported in C++ mode as ODR violations.  It's a genuine GCC
> bug.

I don't think your case proves that.  In your "reduction" code, you have
this:

void
kbd_buffer_store_buffered_event (union buffered_input_event *event,
				 struct input_event *hold_quit)
{
  *hold_quit = event->ie;
  *kbd_store_ptr = *event;
}

When event->ie is accessed, GCC can conclude that the 'ie' union member,
not the 'sie' union member, is active, and legitimately perform the
truncation which results in the incorrect code.

It is, of course, possible that there's still a GCC bug here.

Pip





This bug report was last modified 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.