xref: /freebsd/contrib/llvm-project/compiler-rt/lib/lsan/lsan_flags.inc (revision dd41de95a84d979615a2ef11df6850622bf6184e)
1//===-- lsan_flags.inc ------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// LSan runtime flags.
10//
11//===----------------------------------------------------------------------===//
12#ifndef LSAN_FLAG
13# error "Define LSAN_FLAG prior to including this file!"
14#endif
15
16// LSAN_FLAG(Type, Name, DefaultValue, Description)
17// See COMMON_FLAG in sanitizer_flags.inc for more details.
18
19LSAN_FLAG(bool, report_objects, false,
20          "Print addresses of leaked objects after main leak report.")
21LSAN_FLAG(
22    int, resolution, 0,
23    "Aggregate two objects into one leak if this many stack frames match. If "
24    "zero, the entire stack trace must match.")
25LSAN_FLAG(int, max_leaks, 0, "The number of leaks reported.")
26
27// Flags controlling the root set of reachable memory.
28LSAN_FLAG(bool, use_globals, true,
29          "Root set: include global variables (.data and .bss)")
30LSAN_FLAG(bool, use_stacks, true, "Root set: include thread stacks")
31LSAN_FLAG(bool, use_registers, true, "Root set: include thread registers")
32LSAN_FLAG(bool, use_tls, true,
33          "Root set: include TLS and thread-specific storage")
34LSAN_FLAG(bool, use_root_regions, true,
35          "Root set: include regions added via __lsan_register_root_region().")
36LSAN_FLAG(bool, use_ld_allocations, true,
37          "Root set: mark as reachable all allocations made from dynamic "
38          "linker. This was the old way to handle dynamic TLS, and will "
39          "be removed soon. Do not use this flag.")
40
41LSAN_FLAG(bool, use_unaligned, false, "Consider unaligned pointers valid.")
42LSAN_FLAG(bool, use_poisoned, false,
43          "Consider pointers found in poisoned memory to be valid.")
44LSAN_FLAG(bool, log_pointers, false, "Debug logging")
45LSAN_FLAG(bool, log_threads, false, "Debug logging")
46LSAN_FLAG(const char *, suppressions, "", "Suppressions file name.")
47