2015-01-07 08:38:00 +08:00
|
|
|
//===-- 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.")
|
|
|
|
|
|
|
|
// 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")
|
2017-05-17 23:25:41 +08:00
|
|
|
LSAN_FLAG(bool, use_tls, !SANITIZER_MAC,
|
2015-01-07 08:38:00 +08:00
|
|
|
"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().")
|
2016-01-15 03:16:05 +08:00
|
|
|
LSAN_FLAG(bool, use_ld_allocations, true,
|
|
|
|
"Root set: mark as reachable all allocations made from dynamic "
|
|
|
|
"linker. This was the old way to handle dynamic TLS, and will "
|
|
|
|
"be removed soon. Do not use this flag.")
|
2015-01-07 08:38:00 +08:00
|
|
|
|
|
|
|
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")
|
2015-02-21 01:41:59 +08:00
|
|
|
LSAN_FLAG(const char *, suppressions, "", "Suppressions file name.")
|