r310136 - [libFuzzer] add -fsanitize-coverage-pc-table to -fsanitize=fuzzer

Kostya Serebryany via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 4 14:35:11 PDT 2017


Author: kcc
Date: Fri Aug  4 14:35:11 2017
New Revision: 310136

URL: http://llvm.org/viewvc/llvm-project?rev=310136&view=rev
Log:
[libFuzzer] add -fsanitize-coverage-pc-table to -fsanitize=fuzzer

Modified:
    cfe/trunk/lib/Driver/SanitizerArgs.cpp
    cfe/trunk/test/Driver/fuzzer.c

Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/SanitizerArgs.cpp?rev=310136&r1=310135&r2=310136&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/SanitizerArgs.cpp (original)
+++ cfe/trunk/lib/Driver/SanitizerArgs.cpp Fri Aug  4 14:35:11 2017
@@ -288,7 +288,8 @@ SanitizerArgs::SanitizerArgs(const ToolC
 
       // Enable coverage if the fuzzing flag is set.
       if (Add & Fuzzer)
-        CoverageFeatures |= CoverageTracePCGuard | CoverageIndirCall | CoverageTraceCmp;
+        CoverageFeatures |= CoverageTracePCGuard | CoverageIndirCall |
+                            CoverageTraceCmp | CoveragePCTable;
 
       Kinds |= Add;
     } else if (Arg->getOption().matches(options::OPT_fno_sanitize_EQ)) {

Modified: cfe/trunk/test/Driver/fuzzer.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fuzzer.c?rev=310136&r1=310135&r2=310136&view=diff
==============================================================================
--- cfe/trunk/test/Driver/fuzzer.c (original)
+++ cfe/trunk/test/Driver/fuzzer.c Fri Aug  4 14:35:11 2017
@@ -6,6 +6,7 @@
 // CHECK-COVERAGE: -fsanitize-coverage-trace-pc-guard
 // CHECK-COVERAGE-SAME: -fsanitize-coverage-indirect-calls
 // CHECK-COVERAGE-SAME: -fsanitize-coverage-trace-cmp
+// CHECK-COVERAGE-SAME: -fsanitize-coverage-pc-table
 
 // RUN: %clang -fsanitize=fuzzer -target i386-unknown-linux -stdlib=platform %s -### 2>&1 | FileCheck --check-prefixes=CHECK-LIBCXX-LINUX %s
 //




More information about the cfe-commits mailing list