[PATCH] D20943: [LibFuzzer] [WIP] Declare and use sanitizer functions in `fuzzer::ExternalFunctions`
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 18:32:49 PDT 2016
kcc added inline comments.
================
Comment at: lib/Fuzzer/FuzzerDriver.cpp:428
@@ +427,3 @@
+// Storage for global ExternalFunctions object.
+ExternalFunctions EF;
+
----------------
delcypher wrote:
> kcc wrote:
> > make this ExternalFunctions *EF
> We could also use `std::unique_ptr<ExternalFunctions>` instead or are you fine with an explicit delete?
I am *not* ok with std::unique_ptr<ExternalFunctions>
And there is no need for an explicit delete.
Just
EF = new .... ;
in main is enough
In tests you may have new/delete or even
std::unique_ptr<ExternalFunctions> t;
EF = t.get()
http://reviews.llvm.org/D20943
More information about the llvm-commits
mailing list