You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/09/28 07:22:01 UTC

incubator-impala git commit: IMPALA-4205: fix tmp-file-mgr-test under ASAN

Repository: incubator-impala
Updated Branches:
  refs/heads/master b5b848f37 -> b7d107a69


IMPALA-4205: fix tmp-file-mgr-test under ASAN

Fix use-after-free of 'file' object.

Change-Id: Ife70225924e6da76fb835ff7b140cb71c87d411d
Reviewed-on: http://gerrit.cloudera.org:8080/4546
Reviewed-by: Dan Hecht <dh...@cloudera.com>
Tested-by: Internal 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/b7d107a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/b7d107a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/b7d107a6

Branch: refs/heads/master
Commit: b7d107a6921d6c0f3a60abb3c20a0bf86656f700
Parents: b5b848f
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Tue Sep 27 16:29:26 2016 -0700
Committer: Internal Jenkins <cl...@gerrit.cloudera.org>
Committed: Wed Sep 28 04:22:51 2016 +0000

----------------------------------------------------------------------
 be/src/runtime/tmp-file-mgr-test.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/b7d107a6/be/src/runtime/tmp-file-mgr-test.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/tmp-file-mgr-test.cc b/be/src/runtime/tmp-file-mgr-test.cc
index 523dcff..cdd0d2d 100644
--- a/be/src/runtime/tmp-file-mgr-test.cc
+++ b/be/src/runtime/tmp-file-mgr-test.cc
@@ -100,8 +100,9 @@ TEST_F(TmpFileMgrTest, TestFileAllocation) {
     EXPECT_EQ(next_offset, boost::filesystem::file_size(file->path()));
   }
   // Check that cleanup is correct.
+  string file_path = file->path();
   file_group.Close();
-  EXPECT_FALSE(boost::filesystem::exists(file->path()));
+  EXPECT_FALSE(boost::filesystem::exists(file_path));
   CheckMetrics(&tmp_file_mgr);
 }