bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42660: emacs-27.1-rc1 and UBsan findings


From: Lars Ingebrigtsen
Subject: bug#42660: emacs-27.1-rc1 and UBsan findings
Date: Mon, 10 Aug 2020 12:37:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

(Please keep the debbugs address in the Cc field.)

Jeffrey Walton <noloader@gmail.com> writes:

>> So it's doing a left shift on a too-high number...  which is something
>> that pgg does, but since that's obsolete, do we care?
>
> Integer wrap is well defined. Cast reg[rrr] to an unsigned. If
> reg[rrr] is left as signed, then it overflows (sign change) and
> wanders into undefined behavior and is subject to removal.
>
> Or you can remove the test.

It would obviously be better to fix the undefined behaviour (if the
compiler is correct here?), but as the only thing that seems to tickle
this behaviour is an obsolete package, I'm not sure we care?

But perhaps we do?

The CCL isn't the most popular stuff in Emacs these days...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]