From bec8cd3375ef019a3623bae5fd7c0a2c37a1933d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 24 May 2024 15:30:42 +0200 Subject: [PATCH] girepository: Disable ASAN when building our typelib We don't care about memory issues during this phase while we should test this separately --- girepository/introspection/meson.build | 5 +++-- meson.build | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/girepository/introspection/meson.build b/girepository/introspection/meson.build index 7b296283b..fe29888d1 100644 --- a/girepository/introspection/meson.build +++ b/girepository/introspection/meson.build @@ -26,8 +26,9 @@ gi_gen_env_variables.prepend(glib_exec_var_library_path, fs.parent(libgmodule.full_path()), fs.parent(libgio.full_path())) if 'address' in glib_sanitizers - gi_gen_env_variables.append( - 'ASAN_OPTIONS', glib_exec_asan_option_ignore_preload, separator: ',') + gi_gen_env_variables.append('ASAN_OPTIONS', + glib_exec_asan_options_disable, + separator: ',') endif if host_system == 'windows' diff --git a/meson.build b/meson.build index f465b7e64..3f4a5df94 100644 --- a/meson.build +++ b/meson.build @@ -2682,12 +2682,18 @@ else glib_exec_var_preload_separator = ' ' endif +glib_exec_asan_options_disable = [] glib_exec_asan_option_ignore_preload = '' if 'address' in glib_sanitizers # libasan needs to be the first in the preload list, and that we can’t # guarantee that, so we have to disable its link order checking when using # LD_PRELOAD in tests. glib_exec_asan_option_ignore_preload = 'verify_asan_link_order=false' + glib_exec_asan_options_disable = [ + glib_exec_asan_option_ignore_preload, + 'start_deactivated=true', + 'detect_leaks=false', + ] endif if glib_gnu_cc_compiler and host_system != 'windows'