impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5246: MemTestClose() should handle Expr's preparation failure
Date Wed, 03 May 2017 19:31:08 GMT
Hello Taras Bobrovytsky,

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

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

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

Change subject: IMPALA-5246: MemTestClose() should handle Expr's preparation failure
......................................................................

IMPALA-5246: MemTestClose() should handle Expr's preparation failure

UDF may fail to initialize due exceeding memory limit or
other reasons. In which case, its Prepare() function may
not have been called and its thread local state may not be
initialized.

MemTestClose() in test-udf.cc made the wrong assumption that
the thread local states are always initialized. This may lead
to de-referencing null pointer in Close(). This change fixes
this issue by checking the thread local state is not null and
returns early if so. Also sets the fragment or thread local
states in FunctionContext to nullptr after freeing them in
various built-in's Close() functions.

Change-Id: Id2c689246ed4f8dd38f104fa35904f3926a7039c
---
M be/src/exprs/case-expr.cc
M be/src/exprs/hive-udf-call.cc
M be/src/exprs/in-predicate.h
M be/src/exprs/like-predicate.cc
M be/src/exprs/math-functions-ir.cc
M be/src/exprs/string-functions-ir.cc
M be/src/exprs/timestamp-functions.cc
M be/src/exprs/udf-builtins-ir.cc
M be/src/exprs/utility-functions.cc
M be/src/testutil/test-udfs.cc
M be/src/udf/udf-test.cc
11 files changed, 25 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/57/6757/4
-- 
To view, visit http://gerrit.cloudera.org:8080/6757
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id2c689246ed4f8dd38f104fa35904f3926a7039c
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Attila Jeges <attilaj@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tbobrovytsky@cloudera.com>

Mime
View raw message