IMPALA-5031: remove undefined behavior: nullptr member function call

This member function call on a nullptr to a FragmentInstanceState was
present in data loading, end-to-end tests, and custom cluster tests.

Change-Id: I2377c14f7ea8f93bb96504dd2319c11ff709cd26
Reviewed-on: http://gerrit.cloudera.org:8080/6714
Reviewed-by: Michael Ho <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/c1463ff6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/c1463ff6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/c1463ff6

Branch: refs/heads/master
Commit: c1463ff6b1db163ead319636c419ee3b3a0d3e49
Parents: 72cf359
Author: Jim Apple <[email protected]>
Authored: Fri Apr 21 15:18:59 2017 -0700
Committer: Impala Public Jenkins <[email protected]>
Committed: Sun Apr 23 03:26:07 2017 +0000

----------------------------------------------------------------------
 be/src/runtime/coordinator.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/c1463ff6/be/src/runtime/coordinator.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/coordinator.cc b/be/src/runtime/coordinator.cc
index 3fcdb54..a8284c2 100644
--- a/be/src/runtime/coordinator.cc
+++ b/be/src/runtime/coordinator.cc
@@ -376,7 +376,7 @@ Coordinator::~Coordinator() {
 }
 
 PlanFragmentExecutor* Coordinator::executor() {
-  return coord_instance_->executor();
+  return (coord_instance_ == nullptr) ? nullptr : coord_instance_->executor();
 }
 
 TExecNodePhase::type GetExecNodePhase(const string& key) {

Reply via email to