[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: clang memory sanitizer report unsigned int overflow
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Fri, 6 Jan 2023 11:40:29 +0100
On 06/01/2023 11:33, Lorenzo Donati wrote:
I said "in some context", not "in general". However
On 06/01/2023 08:51, bil til wrote:
If you would count this as "overflow/invalid", then presumably every
Lua (or C) Code like this also would show some overflow:
i= 1 << 65;
this is most probably UB  unless, as Francisco Olarte said in his
post, you have ints with 65 bits or more (presumably 128?).
Actually, rereading my own post and my C99 standard citation, you would
need ints with at least 66 bits. Shifting out all the bits is UB.