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
main
Yueh-Hsuan Chiang 9 years ago
parent b0afcdeeac
commit 955ecf8b49
  1. 1
      db/compact_files_test.cc

@ -107,6 +107,7 @@ TEST_F(CompactFilesTest, L0ConflictsFiles) {
break;
}
}
rocksdb::SyncPoint::GetInstance()->DisableProcessing();
delete db;
}

Loading…
Cancel
Save