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 #143 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: Paul Eggert <eggert <at> cs.ucla.edu>, iura.mail <at> gmail.com,
 Stefan Kangas <stefankangas <at> gmail.com>, michael.albinus <at> gmx.de,
 Eli Zaretskii <eliz <at> gnu.org>, 76559 <at> debbugs.gnu.org, marian.iurie <at> gmail.com
Subject: Re: bug#76559: 31.0.50;
 [-O3 + PGTK] Crash when 'copying as kill'/'killing word'
Date: Sun, 02 Mar 2025 10:33:09 +0000
R"Po Lu" <luangruo <at> yahoo.com> writes:

> Paul Eggert <eggert <at> cs.ucla.edu> writes:
>
>> On 2025-03-01 21:10, Po Lu wrote:
>>>> I don't see why that assumption would cause GCC to generate the wrong
>>>> code here, as no single thread of execution would have two such
>>>> accesses.
>>> It doesn't take control flow into account, but rather _every statement
>>> operand_ in the current procedure that addresses an aggregate declared
>>> in the same procedure.
>>
>> In that case it's a GCC bug, right? Since GCC promises that one can do
>> union punning.
>
> Yes, that's what I was getting at.  I even proposed a fix.  But the GCC
> list has lately been infused with a series of threads proposing new
> obstacles to engaging with its developers (search "Sourceware
> infrastructure plans"), and I'm not interested...

Are you going to report the GCC bug?  If not, I'd like to do so, with
your permission.

As far as the problem itself is concerned, it's a minor oversight in the
SRA code which fails to account for holes when choosing a representative
union access out of a list of all places which access a given structure,
so the fix seems simple.

Working around the problem may be more difficult, and it might be
easiest to disable the SRA pass for bad GCC versions, but maybe
something will occur to the GCC folks.

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.