summaryrefslogtreecommitdiff
path: root/lib/lsan/lsan_flags.inc
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-01-07 00:38:00 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-01-07 00:38:00 +0000
commit8bb699b511904af2acc7188db146f29da94022da (patch)
tree8d6072816a80284eb43e5499cd10f23afa604fcf /lib/lsan/lsan_flags.inc
parentdf867df2d3da7451984333ebcb6b4040dbcda164 (diff)
downloadcompiler-rt-8bb699b511904af2acc7188db146f29da94022da.tar.gz
[Sanitizer] Change the runtime flag representation.
This mirrors r225239 to all the rest sanitizers: ASan, DFSan, LSan, MSan, TSan, UBSan. Now the runtime flag type, name, default value and description is located in the single place in the .inc file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan_flags.inc')
-rw-r--r--lib/lsan/lsan_flags.inc44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/lsan/lsan_flags.inc b/lib/lsan/lsan_flags.inc
new file mode 100644
index 000000000..7f00acbf9
--- /dev/null
+++ b/lib/lsan/lsan_flags.inc
@@ -0,0 +1,44 @@
+//===-- lsan_flags.inc ------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// LSan runtime flags.
+//
+//===----------------------------------------------------------------------===//
+#ifndef LSAN_FLAG
+# error "Define LSAN_FLAG prior to including this file!"
+#endif
+
+// LSAN_FLAG(Type, Name, DefaultValue, Description)
+// See COMMON_FLAG in sanitizer_flags.inc for more details.
+
+LSAN_FLAG(bool, report_objects, false,
+ "Print addresses of leaked objects after main leak report.")
+LSAN_FLAG(
+ int, resolution, 0,
+ "Aggregate two objects into one leak if this many stack frames match. If "
+ "zero, the entire stack trace must match.")
+LSAN_FLAG(int, max_leaks, 0, "The number of leaks reported.")
+LSAN_FLAG(int, exitcode, 23,
+ "If nonzero kill the process with this exit code upon finding leaks.")
+
+// Flags controlling the root set of reachable memory.
+LSAN_FLAG(bool, use_globals, true,
+ "Root set: include global variables (.data and .bss)")
+LSAN_FLAG(bool, use_stacks, true, "Root set: include thread stacks")
+LSAN_FLAG(bool, use_registers, true, "Root set: include thread registers")
+LSAN_FLAG(bool, use_tls, true,
+ "Root set: include TLS and thread-specific storage")
+LSAN_FLAG(bool, use_root_regions, true,
+ "Root set: include regions added via __lsan_register_root_region().")
+
+LSAN_FLAG(bool, use_unaligned, false, "Consider unaligned pointers valid.")
+LSAN_FLAG(bool, use_poisoned, false,
+ "Consider pointers found in poisoned memory to be valid.")
+LSAN_FLAG(bool, log_pointers, false, "Debug logging")
+LSAN_FLAG(bool, log_threads, false, "Debug logging")