1 //===-- sanitizer_flags.h ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of ThreadSanitizer/AddressSanitizer runtime.
12 //===----------------------------------------------------------------------===//
14 #ifndef SANITIZER_FLAGS_H
15 #define SANITIZER_FLAGS_H
17 #include "sanitizer_internal_defs.h"
19 namespace __sanitizer
{
21 void ParseFlag(const char *env
, bool *flag
,
22 const char *name
, const char *descr
);
23 void ParseFlag(const char *env
, int *flag
,
24 const char *name
, const char *descr
);
25 void ParseFlag(const char *env
, uptr
*flag
,
26 const char *name
, const char *descr
);
27 void ParseFlag(const char *env
, const char **flag
,
28 const char *name
, const char *descr
);
32 const char *external_symbolizer_path
;
34 const char *strip_path_prefix
;
35 bool fast_unwind_on_fatal
;
36 bool fast_unwind_on_malloc
;
38 int malloc_context_size
;
42 bool leak_check_at_exit
;
43 bool allocator_may_return_null
;
47 bool allow_user_segv_handler
;
49 bool detect_deadlocks
;
50 uptr clear_shadow_mmap_threshold
;
52 bool legacy_pthread_cond
;
53 bool intercept_tls_get_addr
;
58 const char *coverage_dir
;
59 bool full_address_space
;
62 inline CommonFlags
*common_flags() {
63 extern CommonFlags common_flags_dont_use
;
64 return &common_flags_dont_use
;
67 void SetCommonFlagsDefaults(CommonFlags
*f
);
68 void ParseCommonFlagsFromString(CommonFlags
*f
, const char *str
);
69 void PrintFlagDescriptions();
71 } // namespace __sanitizer
73 #endif // SANITIZER_FLAGS_H