Suppress UB warnings regarding indirect function calls

Like for POSIX systems, we pass `-fno-sanitize=function`.

Closes GH-17462.
This commit is contained in:
Christoph M. Becker 2025-01-14 14:14:34 +01:00
parent e1c4c0300e
commit 7dbfacb27e

View file

@ -3739,7 +3739,7 @@ function add_asan_opts(cflags_name, libs_name, ldflags_name)
var lib_dir = get_clang_lib_dir(); var lib_dir = get_clang_lib_dir();
if (!!cflags_name) { if (!!cflags_name) {
ADD_FLAG(cflags_name, "-fsanitize=address,undefined"); ADD_FLAG(cflags_name, "-fsanitize=address,undefined -fno-sanitize=function");
} }
if (!!libs_name) { if (!!libs_name) {
if (TARGET_ARCH == 'x64') { if (TARGET_ARCH == 'x64') {