]> granicus.if.org Git - llvm/commitdiff
[libFuzzer] more refactoring
authorKostya Serebryany <kcc@google.com>
Wed, 21 Sep 2016 21:17:23 +0000 (21:17 +0000)
committerKostya Serebryany <kcc@google.com>
Wed, 21 Sep 2016 21:17:23 +0000 (21:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282113 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerDefs.h
lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp
lib/Fuzzer/FuzzerExtFunctionsWeak.cpp
lib/Fuzzer/FuzzerSHA1.cpp
lib/Fuzzer/FuzzerTracePC.cpp
lib/Fuzzer/FuzzerTracePC.h
lib/Fuzzer/FuzzerUtilDarwin.cpp
lib/Fuzzer/FuzzerUtilLinux.cpp
lib/Fuzzer/FuzzerValueBitMap.h
lib/Fuzzer/test/fuzzer-printcovpcs.test

index fa8ef57d70a68b7ed55bda76db9f919ee60c4c34..b871771fab2566a92638aae620f92871d8c4cd59 100644 (file)
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <cstddef>
 #include <cstdint>
+#include <cstring>
 #include <string>
 #include <vector>
 
index 7b9681a61932e36f202ecf2fe3772574d1a98e9d..78d8de7e023d37b23d90033586f0e148c13f2d19 100644 (file)
@@ -11,7 +11,7 @@
 // requires that clients of LibFuzzer pass ``--export-dynamic`` to the linker.
 // That is a complication we don't wish to expose to clients right now.
 //===----------------------------------------------------------------------===//
-#include "FuzzerInternal.h"
+#include "FuzzerDefs.h"
 #if LIBFUZZER_APPLE
 
 #include "FuzzerExtFunctions.h"
index 75c0ed9f830f730b6ae9347eb4f094d125965a99..cd4371ad44fea1345667c79fb23d8642df2d6f8e 100644 (file)
@@ -12,7 +12,7 @@
 // weak symbols to be undefined. That is a complication we don't want to expose
 // to clients right now.
 //===----------------------------------------------------------------------===//
-#include "FuzzerInternal.h"
+#include "FuzzerDefs.h"
 #if LIBFUZZER_LINUX
 
 #include "FuzzerExtFunctions.h"
index b42a04854cde93d9af9ae5e092c96c735448dd5a..cab81a404db60570128d060ce0ab065f46758d60 100644 (file)
@@ -16,7 +16,7 @@
 // For the same reason we do not want to depend on SHA1 from LLVM tree.
 //===----------------------------------------------------------------------===//
 
-#include "FuzzerInternal.h"
+#include "FuzzerDefs.h"
 
 /* This code is public-domain - it is based on libcrypt
  * placed in the public domain by Wei Dai and other contributors.
index 9daa721cfbc2c511785efacf9f75389e2db389b0..4d962d31e78f622eb190af892cba902c3077b701 100644 (file)
@@ -12,8 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "FuzzerInternal.h"
+#include "FuzzerDefs.h"
 #include "FuzzerTracePC.h"
+#include "FuzzerValueBitMap.h"
 
 namespace fuzzer {
 
index 2ba0808c8ce0f4122e54822a4eb30bd7885e3ab6..58497f1e9f54d0b08c9f056b076cee51bf0df678 100644 (file)
@@ -13,6 +13,7 @@
 #define LLVM_FUZZER_TRACE_PC
 
 #include "FuzzerDefs.h"
+#include "FuzzerValueBitMap.h"
 
 namespace fuzzer {
 
index ab25ffbe50cd3b1576361a411c566b650a50fe38..4c90998c897ebe7ced1eee0a440a2db2e0b53101 100644 (file)
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 // Misc utils for Darwin.
 //===----------------------------------------------------------------------===//
-#include "FuzzerInternal.h"
+#include "FuzzerDefs.h"
 #if LIBFUZZER_APPLE
 #include <mutex>
 #include <signal.h>
index f18e471717bd4d7756927d13681b5360892529f2..e63c7d9a07f40e457646ca659d312d55954b6159 100644 (file)
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 // Misc utils for Linux.
 //===----------------------------------------------------------------------===//
-#include "FuzzerInternal.h"
+#include "FuzzerDefs.h"
 #if LIBFUZZER_LINUX
 #include <stdlib.h>
 namespace fuzzer {
index 6f6ca1164730c912e2b1840729eefe3a5532df31..07e52fc5a542256848aeea61029219323881d2c2 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef LLVM_FUZZER_VALUE_BIT_MAP_H
 #define LLVM_FUZZER_VALUE_BIT_MAP_H
 
+#include "FuzzerDefs.h"
+
 namespace fuzzer {
 
 // A bit map containing kMapSizeInWords bits.
index 9936edd6c3bffcb84f4459afeb5bf28fc6ef7463..721e50dcbe73db8f384a0573b6b1c425bf2c8611 100644 (file)
@@ -1,5 +1,5 @@
-RUN: LLVMFuzzer-SimpleTest         -print_pcs=1 2>&1 | FileCheck %s --check-prefix=PCS
-RUN: LLVMFuzzer-SimpleTest-TracePC -print_pcs=1 2>&1 | FileCheck %s --check-prefix=PCS
+RUN: LLVMFuzzer-SimpleTest         -print_pcs=1 -seed=1 2>&1 | FileCheck %s --check-prefix=PCS
+RUN: LLVMFuzzer-SimpleTest-TracePC -print_pcs=1 -seed=1 2>&1 | FileCheck %s --check-prefix=PCS
 PCS-NOT: NEW_PC
 PCS:INITED
 PCS:NEW_PC: {{0x[a-f0-9]+}}