[
https://issues.apache.org/jira/browse/IMPALA-5031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16889838#comment-16889838
]
ASF subversion and git services commented on IMPALA-5031:
---------------------------------------------------------
Commit a7a80d1241a09cfa1f73a80900b74a012de52641 in impala's branch
refs/heads/master from Jim Apple
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=a7a80d1 ]
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]>
> UBSAN clean and method for testing UBSAN cleanliness
> ----------------------------------------------------
>
> Key: IMPALA-5031
> URL: https://issues.apache.org/jira/browse/IMPALA-5031
> Project: IMPALA
> Issue Type: Task
> Components: Backend, Infrastructure
> Affects Versions: Impala 2.9.0
> Reporter: Jim Apple
> Assignee: Jim Apple
> Priority: Minor
>
> http://releases.llvm.org/3.8.0/tools/clang/docs/UndefinedBehaviorSanitizer.html
> builds are supported after https://gerrit.cloudera.org/#/c/6186/, but
> Impala's test suite triggers many errors under UBSAN. Those errors should be
> fixed and then there should be a way to run the test suite under UBSAN and
> fail if there were any errors detected.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]