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

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 10 Aug 2020 12:37:12 +0200

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

Jeffrey Walton <[email-masked]> 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...