> From: John Regehr via RT [mailto:[email protected]]
> Sent: Wednesday, November 13, 2013 10:52 AM
> 
> I built openssl-SNAP-20131112 on an x86-64 Linux machine using Clang's
> undefined behavior sanitizer, ran "make check", and got the problems
> below.  The shifts by 32 are potentially serious whereas the signed
> left shift errors are thought to be benign at the moment.
> 
> c_enc.c:114:2: runtime error: shift exponent 32 is too large for
> 32-bit type 'unsigned int'
> ...
> a_int.c:397:4: runtime error: left shift of 63112885863764107 by 8
> places cannot be represented in type 'long'
> ...

It's not safe to say that the signed shift errors are benign. C's behaviour is 
undefined in all these cases, the compiler could do anything (including doing 
what the coder hoped for with no other side effects, but that's one of an 
infinite number of possibilities).

Regards,
                   jjf
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to