OSDN Git Service

[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 fa8ef57..b871771 100644 (file)
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <cstddef>
 #include <cstdint>
+#include <cstring>
 #include <string>
 #include <vector>
 
index 7b9681a..78d8de7 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 75c0ed9..cd4371a 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 b42a048..cab81a4 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 9daa721..4d962d3 100644 (file)
@@ -12,8 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "FuzzerInternal.h"
+#include "FuzzerDefs.h"
 #include "FuzzerTracePC.h"
+#include "FuzzerValueBitMap.h"
 
 namespace fuzzer {
 
index 2ba0808..58497f1 100644 (file)
@@ -13,6 +13,7 @@
 #define LLVM_FUZZER_TRACE_PC
 
 #include "FuzzerDefs.h"
+#include "FuzzerValueBitMap.h"
 
 namespace fuzzer {
 
index ab25ffb..4c90998 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 f18e471..e63c7d9 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 6f6ca11..07e52fc 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 9936edd..721e50d 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]+}}