[llvm] r228429 - [fuzzer] move default sanitizer options to a separate file
Kostya Serebryany
kcc at google.com
Fri Feb 6 11:52:08 PST 2015
Author: kcc
Date: Fri Feb 6 13:52:07 2015
New Revision: 228429
URL: http://llvm.org/viewvc/llvm-project?rev=228429&view=rev
Log:
[fuzzer] move default sanitizer options to a separate file
Added:
llvm/trunk/lib/Fuzzer/FuzzerSanitizerOptions.cpp
Modified:
llvm/trunk/lib/Fuzzer/CMakeLists.txt
llvm/trunk/lib/Fuzzer/FuzzerMain.cpp
Modified: llvm/trunk/lib/Fuzzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/CMakeLists.txt?rev=228429&r1=228428&r2=228429&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/CMakeLists.txt (original)
+++ llvm/trunk/lib/Fuzzer/CMakeLists.txt Fri Feb 6 13:52:07 2015
@@ -6,6 +6,7 @@ if( LLVM_USE_SANITIZE_COVERAGE )
FuzzerIO.cpp
FuzzerLoop.cpp
FuzzerMutate.cpp
+ FuzzerSanitizerOptions.cpp
FuzzerUtil.cpp
)
add_library(LLVMFuzzer STATIC
Modified: llvm/trunk/lib/Fuzzer/FuzzerMain.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerMain.cpp?rev=228429&r1=228428&r2=228429&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerMain.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerMain.cpp Fri Feb 6 13:52:07 2015
@@ -18,13 +18,6 @@
#include <atomic>
#include <mutex>
-// ASAN options:
-// * don't dump the coverage to disk.
-// * enable coverage by default.
-extern "C" const char *__asan_default_options() {
- return "coverage_pcs=0:coverage=1";
-}
-
// Program arguments.
struct FlagDescription {
const char *Name;
Added: llvm/trunk/lib/Fuzzer/FuzzerSanitizerOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerSanitizerOptions.cpp?rev=228429&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerSanitizerOptions.cpp (added)
+++ llvm/trunk/lib/Fuzzer/FuzzerSanitizerOptions.cpp Fri Feb 6 13:52:07 2015
@@ -0,0 +1,18 @@
+//===- FuzzerSanitizerOptions.cpp - default flags for sanitizers ----------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+// Set default options for sanitizers while running the fuzzer.
+// Options reside in a separate file, so if we don't want to set the default
+// options we simply do not link this file in.
+// ASAN options:
+// * don't dump the coverage to disk.
+// * enable coverage by default.
+//===----------------------------------------------------------------------===//
+extern "C" const char *__asan_default_options() {
+ return "coverage_pcs=0:coverage=1";
+}
More information about the llvm-commits
mailing list