Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1336457 - Update libFuzzer revision r=franziskus
Differential Revision: https://nss-review.dev.mozaws.net/D190

--HG--
extra : amend_source : 1af9487413fcca1188eb4daaebf41bfc16b327be
  • Loading branch information
Tim Taubert committed Feb 3, 2017
1 parent d89b378 commit 780cc53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
10 changes: 5 additions & 5 deletions fuzz/clone_libfuzzer.sh
@@ -1,7 +1,7 @@
#!/bin/sh

d=$(dirname $0)
$d/git-copy.sh https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer 33c20f597a2e312611d52677ff0fdd9335b485b7 $d/libFuzzer
$d/git-copy.sh https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer 0b27dad707a1d67ec854423e25b1a521c9d5ab7a $d/libFuzzer

# [https://llvm.org/bugs/show_bug.cgi?id=31318]
# This prevents a known buffer overrun that won't be fixed as the affected code
Expand All @@ -11,7 +11,7 @@ cat <<EOF | patch -p0 -d $d
diff --git libFuzzer/FuzzerLoop.cpp libFuzzer/FuzzerLoop.cpp
--- libFuzzer/FuzzerLoop.cpp
+++ libFuzzer/FuzzerLoop.cpp
@@ -472,6 +472,9 @@
@@ -476,6 +476,9 @@
uint8_t dummy;
ExecuteCallback(&dummy, 0);
Expand All @@ -30,9 +30,9 @@ cat <<EOF | patch -p0 -d $d
diff --git libFuzzer/FuzzerTracePC.cpp libFuzzer/FuzzerTracePC.cpp
--- libFuzzer/FuzzerTracePC.cpp
+++ libFuzzer/FuzzerTracePC.cpp
@@ -24,6 +24,12 @@
#include <set>
#include <sstream>
@@ -31,6 +31,12 @@
__sancov_trace_pc_guard_8bit_counters[fuzzer::TracePC::kNumPCs];
uintptr_t __sancov_trace_pc_pcs[fuzzer::TracePC::kNumPCs];
+#if defined(__clang_major__) && (__clang_major__ == 3)
+void __sanitizer_dump_coverage(const uintptr_t *pcs, uintptr_t len) {
Expand Down
21 changes: 1 addition & 20 deletions fuzz/fuzz.gyp
Expand Up @@ -42,26 +42,7 @@
['fuzz_oss==0', {
'type': 'static_library',
'sources': [
'libFuzzer/FuzzerCrossOver.cpp',
'libFuzzer/FuzzerDriver.cpp',
'libFuzzer/FuzzerExtFunctionsDlsym.cpp',
'libFuzzer/FuzzerExtFunctionsWeak.cpp',
'libFuzzer/FuzzerExtFunctionsWeakAlias.cpp',
'libFuzzer/FuzzerIO.cpp',
'libFuzzer/FuzzerIOPosix.cpp',
'libFuzzer/FuzzerIOWindows.cpp',
'libFuzzer/FuzzerLoop.cpp',
'libFuzzer/FuzzerMain.cpp',
'libFuzzer/FuzzerMerge.cpp',
'libFuzzer/FuzzerMutate.cpp',
'libFuzzer/FuzzerSHA1.cpp',
'libFuzzer/FuzzerTracePC.cpp',
'libFuzzer/FuzzerTraceState.cpp',
'libFuzzer/FuzzerUtil.cpp',
'libFuzzer/FuzzerUtilDarwin.cpp',
'libFuzzer/FuzzerUtilLinux.cpp',
'libFuzzer/FuzzerUtilPosix.cpp',
'libFuzzer/FuzzerUtilWindows.cpp',
'<!@(ls <(DEPTH)/fuzz/libFuzzer/*.cpp)',
],
'cflags/': [
['exclude', '-fsanitize-coverage'],
Expand Down

0 comments on commit 780cc53

Please sign in to comment.