Skip to content

Commit

Permalink
fix compaction_picker_test asan heap use after free (#12908)
Browse files Browse the repository at this point in the history
Summary:
![image](https://github.com/user-attachments/assets/3290fe18-aca2-4691-b072-fbbc96a15fb1)

this testcase set syncpoint function which reference this test case heap variable "enable_per_key_placement_" and this sync point function will be triggered by another testcase, so asan will report asan heap use after free error

Pull Request resolved: #12908

Reviewed By: hx235

Differential Revision: D60973363

Pulled By: cbi42

fbshipit-source-id: df4f488f51e7741784d5a92fc0a5fc538c5d5b1a
  • Loading branch information
SGZW authored and facebook-github-bot committed Aug 9, 2024
1 parent 5c456c4 commit 6727f0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion db/compaction/compaction_picker_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ class CompactionPickerTest : public CompactionPickerTestBase {
explicit CompactionPickerTest()
: CompactionPickerTestBase(BytewiseComparator()) {}

~CompactionPickerTest() override = default;
~CompactionPickerTest() override {
SyncPoint::GetInstance()->ClearAllCallBacks();
SyncPoint::GetInstance()->DisableProcessing();
}
};

class CompactionPickerU64TsTest : public CompactionPickerTestBase {
Expand Down

0 comments on commit 6727f0f

Please sign in to comment.