Impala Public Jenkins has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/13769 )
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 such an error in exec-node.cc in the end-to-end tests. The
interesting part of the backtrace is:
exec/exec-node.cc:396:27: runtime error: member call on null pointer
of type 'MemTracker'
#0 in ExecNode::ExecDebugActionImpl(TExecNodePhase::type,
RuntimeState*) exec/exec-node.cc:396:27
#1 in ExecNode::ExecDebugAction(TExecNodePhase::type,
RuntimeState*) exec/exec-node.h:379:12
#2 in ExecNode::Prepare(RuntimeState*) exec/exec-node.cc:106:43
#3 in TopNNode::Prepare(RuntimeState*) exec/topn-node.cc:75:53
Change-Id: Id62d1c504a273451dc1be6831a473f6c7115b403
Reviewed-on: http://gerrit.cloudera.org:8080/13769
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/exec/exec-node.cc
M be/src/runtime/mem-tracker.cc
M be/src/runtime/mem-tracker.h
3 files changed, 24 insertions(+), 12 deletions(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/13769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id62d1c504a273451dc1be6831a473f6c7115b403
Gerrit-Change-Number: 13769
Gerrit-PatchSet: 5
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Lars Volker <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>