From: Vitaly Buka Date: Wed, 8 Mar 2023 06:26:07 +0000 (-0800) Subject: [fuzzer] Make sure we never delete Fuzzer X-Git-Tag: upstream/17.0.6~15546 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e09b3be411b0cfbf560edd4e089b2810c1ba2685;p=platform%2Fupstream%2Fllvm.git [fuzzer] Make sure we never delete Fuzzer --- diff --git a/compiler-rt/lib/fuzzer/FuzzerInternal.h b/compiler-rt/lib/fuzzer/FuzzerInternal.h index a732ca87..4194bc6 100644 --- a/compiler-rt/lib/fuzzer/FuzzerInternal.h +++ b/compiler-rt/lib/fuzzer/FuzzerInternal.h @@ -29,12 +29,12 @@ namespace fuzzer { using namespace std::chrono; -class Fuzzer { +class Fuzzer final { public: Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD, FuzzingOptions Options); - ~Fuzzer(); + ~Fuzzer() = delete; void Loop(std::vector &CorporaFiles); void ReadAndExecuteSeedCorpora(std::vector &CorporaFiles); void MinimizeCrashLoop(const Unit &U); diff --git a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp index 3609c7f..121f781 100644 --- a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp @@ -160,8 +160,6 @@ Fuzzer::Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD, memset(BaseSha1, 0, sizeof(BaseSha1)); } -Fuzzer::~Fuzzer() {} - void Fuzzer::AllocateCurrentUnitData() { if (CurrentUnitData || MaxInputLen == 0) return;