dfsan_flags.inc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //===-- dfsan_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. // DFSan runtime flags.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef DFSAN_FLAG
  13. # error "Define DFSAN_FLAG prior to including this file!"
  14. #endif
  15. // DFSAN_FLAG(Type, Name, DefaultValue, Description)
  16. // See COMMON_FLAG in sanitizer_flags.inc for more details.
  17. DFSAN_FLAG(bool, warn_unimplemented, false,
  18. "Whether to warn on unimplemented functions.")
  19. DFSAN_FLAG(bool, warn_nonzero_labels, false,
  20. "Whether to warn on unimplemented functions.")
  21. DFSAN_FLAG(
  22. bool, strict_data_dependencies, true,
  23. "Whether to propagate labels only when there is an obvious data dependency"
  24. "(e.g., when comparing strings, ignore the fact that the output of the"
  25. "comparison might be data-dependent on the content of the strings). This"
  26. "applies only to the custom functions defined in 'custom.c'.")
  27. DFSAN_FLAG(
  28. int, origin_history_size, Origin::kMaxDepth,
  29. "The limit of origin chain length. Non-positive values mean unlimited.")
  30. DFSAN_FLAG(
  31. int, origin_history_per_stack_limit, 20000,
  32. "The limit of origin node's references count. "
  33. "Non-positive values mean unlimited.")
  34. DFSAN_FLAG(int, store_context_size, 20,
  35. "The depth limit of origin tracking stack traces.")
  36. DFSAN_FLAG(bool, check_origin_invariant, false,
  37. "Whether to check if the origin invariant holds.")
  38. DFSAN_FLAG(bool, zero_in_malloc, true,
  39. "Whether to zero shadow space of new allocated memory.")
  40. DFSAN_FLAG(bool, zero_in_free, true,
  41. "Whether to zero shadow space of deallocated memory.")