Merge branch 'test-thread-fixup-asan' into 'master'

test: thread: set default asan options to use_sigaltstack=0

See merge request videolan/vlc!1709
This commit is contained in:
Alexandre Janniaux 2024-04-28 07:11:01 +00:00
commit 80c01692ca
1 changed files with 11 additions and 0 deletions

View File

@ -31,6 +31,17 @@
#include <vlc_common.h>
#include <vlc_threads.h>
/* ASAN won't intercept longjump calls that are used in pthread cancellation
* handlers, when using pthread_cleanup_push/pop. These calls are breaking
* the ASAN checks when it's using sigaltstack, so disable it. */
#if defined(__SANITIZE_ADDRESS__)
VLC_EXPORT const char *__asan_default_options();
VLC_EXPORT const char *__asan_default_options() {
return "use_sigaltstack=0";
}
#endif
static int thread_data_magic = 0x1234;
static int thread_return_magic = 0x4321;