build: add ubsan default options

Use print_stacktrace=1 for UBSAN by default.
This commit is contained in:
ii14
2023-04-22 03:27:32 +02:00
parent 33687f5e87
commit 4cc69f45b4
6 changed files with 17 additions and 7 deletions

View File

@@ -2222,3 +2222,17 @@ static void check_swap_exists_action(void)
}
handle_swap_exists(NULL);
}
#ifdef ENABLE_ASAN_UBSAN
const char *__ubsan_default_options(void);
const char *__ubsan_default_options(void)
{
return "print_stacktrace=1";
}
const char *__asan_default_options(void);
const char *__asan_default_options(void)
{
return "handle_abort=1,handle_sigill=1";
}
#endif