lsan_flags.inc 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. // LSAN_FLAG(Type, Name, DefaultValue, Description)
  16. // See COMMON_FLAG in sanitizer_flags.inc for more details.
  17. LSAN_FLAG(bool, report_objects, false,
  18. "Print addresses of leaked objects after main leak report.")
  19. LSAN_FLAG(
  20. int, resolution, 0,
  21. "Aggregate two objects into one leak if this many stack frames match. If "
  22. "zero, the entire stack trace must match.")
  23. LSAN_FLAG(int, max_leaks, 0, "The number of leaks reported.")
  24. // Flags controlling the root set of reachable memory.
  25. LSAN_FLAG(bool, use_globals, true,
  26. "Root set: include global variables (.data and .bss)")
  27. LSAN_FLAG(bool, use_stacks, true, "Root set: include thread stacks")
  28. LSAN_FLAG(bool, use_registers, true, "Root set: include thread registers")
  29. LSAN_FLAG(bool, use_tls, true,
  30. "Root set: include TLS and thread-specific storage")
  31. LSAN_FLAG(bool, use_root_regions, true,
  32. "Root set: include regions added via __lsan_register_root_region().")
  33. LSAN_FLAG(bool, use_ld_allocations, true,
  34. "Root set: mark as reachable all allocations made from dynamic "
  35. "linker. This was the old way to handle dynamic TLS, and will "
  36. "be removed soon. Do not use this flag.")
  37. LSAN_FLAG(bool, use_unaligned, false, "Consider unaligned pointers valid.")
  38. LSAN_FLAG(bool, use_poisoned, false,
  39. "Consider pointers found in poisoned memory to be valid.")
  40. LSAN_FLAG(bool, log_pointers, false, "Debug logging")
  41. LSAN_FLAG(bool, log_threads, false, "Debug logging")
  42. LSAN_FLAG(const char *, suppressions, "", "Suppressions file name.")