[ub] ub due to left operand of shift

Gabriel Dos Reis gdr at microsoft.com
Fri Oct 25 01:04:08 CEST 2013


| -----Original Message-----
| From: ub-bounces at open-std.org [mailto:ub-bounces at open-std.org] On Behalf Of
| John Regehr
| Sent: Thursday, October 24, 2013 5:53 PM
| To: ub at open-std.org
| Subject: Re: [ub] ub due to left operand of shift
| 
| >> c_enc.c:107:6: runtime error: shift exponent 32 is too large for 32-bit
| >> type 'unsigned int'
| > ...
| >> c_enc.c:88:6: runtime error: shift exponent 32 is too large for 32-bit
| >> type 'unsigned int'
| >
| > These are a genuine portability problem, but not related to signedness.
| 
| Yes, very nasty, this code may well be broken by compilers right now.  I
| should report these.

Terminology: when you say "may well be broken by compilers right now",
it suggests you think the code is correct; but then that does not go 
well with the first part of your sentence...

| >> eng_table.c:349:2: runtime error: member access within null pointer of
| >> type 'ENGINE_TABLE' (aka 'struct st_engine_table')
| >> s3_srvr.c:1886:13: runtime error: index 4 out of bounds for type
| >> 'BIGNUM *[4]'
| 
| Scary to see this in today's OpenSSL.  I thought it was supposed to be good.



More information about the ub mailing list