[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:09:56 PDT 2016


kcc added inline comments.

================
Comment at: lib/Fuzzer/FuzzerDriver.cpp:272
@@ -271,2 +271,3 @@
   assert(argc && argv && "Argument pointers cannot be nullptr");
-  fuzzer::ExternalFunctions EF;
+  // We should have been called from main() so it should be safe
+  // to call Init() now.
----------------
remove the comment, it makes little sense to me

================
Comment at: lib/Fuzzer/FuzzerDriver.cpp:428
@@ +427,3 @@
+// Storage for global ExternalFunctions object.
+ExternalFunctions EF;
+
----------------
make this ExternalFunctions *EF

================
Comment at: lib/Fuzzer/FuzzerExtFunctions.h:23
@@ -23,1 +22,3 @@
+  // Do not call this function before ``main()`` has been entered.
+  void Init();
 
----------------
Leave the CTOR, initialize with 
     EF = new ... 


http://reviews.llvm.org/D20943





More information about the llvm-commits mailing list