From 955ecf8b49ba71666548fefd2d9aeb5f43b8ab9e Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Tue, 26 Jan 2016 11:30:30 -0800 Subject: [PATCH] Fix an ASAN error in compact_files_test Summary: compact_files_test enables SyncPoint but never disable it before the test terminates. As a result, it might cause heap-use-after-free error when some code path trying to access the static variable of SyncPoint when it has already gone out of scope after the main thread dies. Test Plan: COMPILE_WITH_ASAN=1 make compact_files_test -j32 ./compact_files_test Reviewers: sdong, anthony, kradhakrishnan, rven, andrewkr, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D53379 --- db/compact_files_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/compact_files_test.cc b/db/compact_files_test.cc index b2a131ecf..5512ed11f 100644 --- a/db/compact_files_test.cc +++ b/db/compact_files_test.cc @@ -107,6 +107,7 @@ TEST_F(CompactFilesTest, L0ConflictsFiles) { break; } } + rocksdb::SyncPoint::GetInstance()->DisableProcessing(); delete db; }