Jim Apple has uploaded this change for review. (
http://gerrit.cloudera.org:8080/13803
Change subject: IMPALA-5031: method calls on NULL are not UBSAN-clean
......................................................................
IMPALA-5031: method calls on NULL are not UBSAN-clean
According to [expr.post] in the C++14 standard, a call to a member
function like a->b() is interpreted as (a->b)(). In other words, the
dereferencing is done separately from the call. This makes calling
member functions on nullptr undefined behavior, since the dereference
invokes undefined behavior.
This fixes an error in hdfs-scanner.h in the end-to-end tests. The
interesting part of the backtrace is:
exec/hdfs-scanner.h:512:14: runtime error: member call on null pointer
of type 'Tuple'
#0 HdfsScanner::InitTuple(TupleDescriptor const*, Tuple*, Tuple*)
exec/hdfs-scanner.h:512:14
#1 HdfsOrcScanner::AssembleCollection(OrcComplexColumnReader
const&, int, CollectionValueBuilder*)
exec/hdfs-orc-scanner.cc:743:7
#2 OrcCollectionReader::ReadValue(int, Tuple*, MemPool*)
exec/orc-column-readers.cc:375:20
#3 OrcStructReader::ReadValue(int, Tuple*, MemPool*)
exec/orc-column-readers.cc:322:52
#4 OrcStructReader::ReadValue(int, Tuple*, MemPool*)
exec/orc-column-readers.cc:322:52
#5 OrcStructReader::TransferTuple(Tuple*, MemPool*)
exec/orc-column-readers.cc:346:52
#6 HdfsOrcScanner::TransferTuples(OrcComplexColumnReader*,
RowBatch*) exec/hdfs-orc-scanner.cc:670:58
#7 HdfsOrcScanner::AssembleRows(RowBatch*)
exec/hdfs-orc-scanner.cc:630:45
#8 HdfsOrcScanner::GetNextInternal(RowBatch*)
exec/hdfs-orc-scanner.cc:508:19
#9 HdfsOrcScanner::ProcessSplit() exec/hdfs-orc-scanner.cc:427:21
#10 HdfsScanNode::ProcessSplit(vector<FilterContext> const&,
MemPool*, io::ScanRange*, long*) exec/hdfs-scan-node.cc:514:21
#11 HdfsScanNode::ScannerThread(bool, long)
exec/hdfs-scan-node.cc:415:7
#12 HdfsScanNode::ThreadTokenAvailableCb(ThreadResourcePool*)::$_0
::operator()() const exec/hdfs-scan-node.cc:337:13
Change-Id: I7e5b130848a3c8f11d9010b3378f4054a35e1612
---
M be/src/exec/hdfs-scanner.h
M be/src/runtime/tuple.h
2 files changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/03/13803/1
--
To view, visit http://gerrit.cloudera.org:8080/13803
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e5b130848a3c8f11d9010b3378f4054a35e1612
Gerrit-Change-Number: 13803
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Apple <[email protected]>