Impala Public Jenkins has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/12514 )
Change subject: IMPALA-5031: oversized signed shifts are undefined
......................................................................
IMPALA-5031: oversized signed shifts are undefined
Standard section [expr.shift] says that E1 << E2 is undefined if E1 is
of signed type and the result cannot be represented in the
corresponding unsigned type. We can't simply change 1 << bit_width to
1u << bit_width, though, becuase it is the second argument of the
modulo operator, and following [expr.mul], "If the second operand of /
or % is zero the behavior is undefined."
This expression is tripped in RleTest.ValueSkippingFuzzy, with the
following backtrace:
util/rle-test.cc:304:29: runtime error: shift exponent 32 is too large
for 32-bit type 'int'
#0 RleTest::MakeRandomSequence(unsigned int, int, int, int)::
{lambda(int)#1}::operator()(int) const util/rle-test.cc:304:29
#1 RleTest::MakeRandomSequence(unsigned int, int, int, int)
util/rle-test.cc:315:15
#2 RleTest_ValueSkippingFuzzy_Test::TestBody()
util/rle-test.cc:392:25
Change-Id: I7debbd1ca5bd3ae640701ce0e95a12c5059abfd7
Reviewed-on: http://gerrit.cloudera.org:8080/12514
Reviewed-by: Tim Armstrong <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/util/rle-test.cc
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Tim Armstrong: Looks good to me, approved
Impala Public Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/12514
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7debbd1ca5bd3ae640701ce0e95a12c5059abfd7
Gerrit-Change-Number: 12514
Gerrit-PatchSet: 3
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>