@@ -98,15 +98,27 @@ static void allsyms_relocate(void)
98
98
****************************************************************************/
99
99
100
100
/****************************************************************************
101
- * Name: __lsan_default_options
101
+ * Name: __xsan_default_options
102
102
*
103
103
* Description:
104
104
* This function may be optionally provided by user and should return
105
- * a string containing leak sanitizer runtime options.
105
+ * a string containing sanitizer runtime options.
106
106
*
107
107
****************************************************************************/
108
108
109
109
#ifdef CONFIG_SIM_ASAN
110
+ const char * __asan_default_options (void )
111
+ {
112
+ return "abort_on_error=1"
113
+ " alloc_dealloc_mismatch=0"
114
+ " allocator_frees_and_returns_null_on_realloc_zero=0"
115
+ " check_initialization_order=1"
116
+ " detect_invalid_pointer_pairs=2"
117
+ " detect_stack_use_after_return=1"
118
+ " fast_unwind_on_malloc=0"
119
+ " strict_init_order=1" ;
120
+ }
121
+
110
122
const char * __lsan_default_options (void )
111
123
{
112
124
/* The fast-unwind implementation of leak-sanitizer will obtain the
@@ -123,7 +135,16 @@ const char *__lsan_default_options(void)
123
135
* disable fast-unwind by default to avoid unwind failure.
124
136
*/
125
137
126
- return "fast_unwind_on_malloc=0" ;
138
+ return "detect_leaks=1"
139
+ " fast_unwind_on_malloc=0" ;
140
+ }
141
+ #endif
142
+
143
+ #ifdef CONFIG_SIM_UBSAN
144
+ const char * __ubsan_default_options (void )
145
+ {
146
+ return "print_stacktrace=1"
147
+ " fast_unwind_on_malloc=0" ;
127
148
}
128
149
#endif
129
150
0 commit comments