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 <[email protected]> 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 <[email protected]> Authored: Tue Sep 27 16:29:26 2016 -0700 Committer: Internal Jenkins <[email protected]> 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); }
