1 //===-- asan_flags.h -------------------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of AddressSanitizer, an address sanity checker.
10 // ASan runtime flags.
11 //===----------------------------------------------------------------------===//
16 #include "sanitizer_common/sanitizer_internal_defs.h"
18 // ASan flag values can be defined in four ways:
19 // 1) initialized with default values at startup.
20 // 2) overriden during compilation of ASan runtime by providing
21 // compile definition ASAN_DEFAULT_OPTIONS.
22 // 3) overriden from string returned by user-specified function
23 // __asan_default_options().
24 // 4) overriden from env variable ASAN_OPTIONS.
29 // Flag descriptions are in asan_rtl.cc.
35 bool check_initialization_order
;
38 bool mac_ignore_invalid_free
;
39 bool detect_stack_use_after_return
;
40 int min_uar_stack_size_log
;
41 int max_uar_stack_size_log
;
43 int max_malloc_fill_size
, malloc_fill_byte
;
45 bool allow_user_poisoning
;
46 int sleep_before_dying
;
47 bool check_malloc_usable_size
;
48 bool unmap_shadow_on_exit
;
55 bool print_full_thread_history
;
58 bool alloc_dealloc_mismatch
;
60 bool strict_init_order
;
61 bool start_deactivated
;
62 int detect_invalid_pointer_pairs
;
63 bool detect_container_overflow
;
64 int detect_odr_violation
;
67 extern Flags asan_flags_dont_use_directly
;
68 inline Flags
*flags() {
69 return &asan_flags_dont_use_directly
;
71 void InitializeFlags(Flags
*f
, const char *env
);
75 #endif // ASAN_FLAGS_H