Hello Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/11047

to look at the new patch set (#2).

Change subject: IMPALA-5031: Fix undefined behavior: right-shifting too far
......................................................................

IMPALA-5031: Fix undefined behavior: right-shifting too far

In expr.shift, the C++ standard says of right shifts:

    The behavior is undefined if the right operand is negative, or
    greater than or equal to the length in bits of the promoted left
    operand.

In HdfsAvroScannerTest.DecimalTest, this is triggered, and the
interesting part of the backtrace is:

exec/hdfs-avro-scanner-ir.cc:272:18: runtime error: shift exponent 32 is too 
large for 32-bit type 'int32_t' (aka 'int')
    #0 0x1786f65 in HdfsAvroScanner::ReadAvroDecimal(int, unsigned char**, 
unsigned char*, bool, void*, MemPool*) exec/hdfs-avro-scanner-ir.cc:272:18
    #1 0x1617778 in void 
HdfsAvroScannerTest::TestReadAvroType<DecimalValue<int>, bool 
(HdfsAvroScanner::*)(int, unsigned char**, unsigned char*, bool, void*, 
MemPool*), unsigned long>(bool (HdfsAvroScanner::*)(int, unsigned char**, 
unsigned char*, bool, void*, MemPool*), unsigned long, unsigned char*, long, 
DecimalValue<int>, int, TErrorCode::type) exec/hdfs-avro-scanner-test.cc:88:20
    #2 0x1605705 in void HdfsAvroScannerTest::TestReadAvroDecimal<int>(unsigned 
char*, long, DecimalValue<int>, int, TErrorCode::type) 
exec/hdfs-avro-scanner-test.cc:184:5

Change-Id: Ic5be92912198af2a5e00053ceb9a4fab43ca6bb8
---
M be/src/exec/hdfs-avro-scanner-ir.cc
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/11047/2
--
To view, visit http://gerrit.cloudera.org:8080/11047
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5be92912198af2a5e00053ceb9a4fab43ca6bb8
Gerrit-Change-Number: 11047
Gerrit-PatchSet: 2
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>

Reply via email to