forked from OSchip/llvm-project
[libFuzzer] Add Fuzzer to the list of sanitizers which support coverage.
Without this change, additional coverage flags specified after -fsanitize=fuzzer would get discarded. https://reviews.llvm.org/D34794 llvm-svn: 306734
This commit is contained in:
parent
2363fdd30f
commit
3f984ecb45
|
@ -32,7 +32,7 @@ enum : SanitizerMask {
|
|||
RequiresPIE = DataFlow,
|
||||
NeedsUnwindTables = Address | Thread | Memory | DataFlow,
|
||||
SupportsCoverage = Address | KernelAddress | Memory | Leak | Undefined |
|
||||
Integer | Nullability | DataFlow,
|
||||
Integer | Nullability | DataFlow | Fuzzer,
|
||||
RecoverableByDefault = Undefined | Integer | Nullability,
|
||||
Unrecoverable = Unreachable | Return,
|
||||
LegacyFsanitizeRecoverMask = Undefined | Integer,
|
||||
|
|
|
@ -15,10 +15,14 @@
|
|||
//
|
||||
// CHECK-LIBCXX-DARWIN: -lc++
|
||||
|
||||
|
||||
// Check that we don't link in libFuzzer.a when producing a shared object.
|
||||
// RUN: %clang -fsanitize=fuzzer %s -shared -o %t.so -### 2>&1 | FileCheck --check-prefixes=CHECK-NOLIB-SO %s
|
||||
// CHECK-NOLIB-SO-NOT: libLLVMFuzzer.a
|
||||
|
||||
// RUN: %clang -fsanitize=fuzzer -fsanitize-coverage=trace-pc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-MSG %s
|
||||
// CHECK-MSG-NOT: argument unused during compilation
|
||||
|
||||
int LLVMFuzzerTestOneInput(const char *Data, long Size) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue