sanitizers: clean up san_options for various cases
/* Raise SIGABRT on error or continue with exitcode logic */
#define kABORT_ENABLED "abort_on_error=1"
-#define kABORT_DISABLED "abort_on_error=0"
+#define kABORT_DISABLED "abort_on_error=0:exitcode=" HF_XSTR(HF_SAN_EXIT_CODE)
/*
* Common sanitizer flags
*/
#define kSAN_COMMON \
"symbolize=1:" \
- "detect_odr_violation=0:" \
"detect_leaks=0:" \
+ "disable_coredump=0:" \
+ "detect_odr_violation=0:" \
"allocator_may_return_null=1:" \
"allow_user_segv_handler=0:" \
"handle_segv=2:" \
"handle_sigbus=2:" \
+ "handle_abort=2:" \
"handle_sigill=2:" \
- "handle_sigfpe=2:" \
- "exitcode=" HF_XSTR(HF_SAN_EXIT_CODE)
+ "handle_sigfpe=2"
/* --{ ASan }-- */
/*
/* --{ LSan }-- */
#define kLSAN_OPTS kSAN_COMMON
-/* If no sanitzer support was requested, simply make it use abort() on errors */
+/* If no sanitzer support was requested, simply abort() on errors */
#define kSAN_REGULAR \
- "abort_on_error=1:handle_segv=0:handle_sigbus=0:handle_abort=0:" \
- "handle_sigill=0:handle_sigfpe=0:allocator_may_return_null=1:" \
- "symbolize=0:detect_leaks=0:disable_coredump=0:" \
- "detect_odr_violation=0"
+ "symbolize=0:" \
+ "detect_leaks=0:" \
+ "disable_coredump=0:" \
+ "detect_odr_violation=0:" \
+ "allocator_may_return_null=1:" \
+ "allow_user_segv_handler=1:" \
+ "handle_segv=0:" \
+ "handle_sigbus=0:" \
+ "handle_abort=0:" \
+ "handle_sigill=0:" \
+ "handle_sigfpe=0:" \
+ "abort_on_error=1"
static void sanitizers_AddFlag(honggfuzz_t* hfuzz, const char* env, const char* val) {
const char* abortFlag = hfuzz->cfg.monitorSIGABRT ? kABORT_ENABLED : kABORT_DISABLED;
