From: Aydın Mercan Date: Sun, 5 Apr 2026 10:25:31 +0000 (+0300) Subject: chg: dev: embed default sanitizer flags in executables X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c60b7da8ac18fac33b1c0b049c13c57dcb7d2ff;p=thirdparty%2Fbind9.git chg: dev: embed default sanitizer flags in executables Replicating CI failures requires the developer to piece together the sanitizer flags by hand, reducing ergonomics. Fix this problem by embedding the relevant settings to the executables. Symbol resolution still needs manual intervention by setting the env variable `*SAN_SYMBOLIZER_PATH`. However, this doesn't affect any behavior. The flags are passed though a meson-configured `sanitize.c.in` template file to toggle which flags are included for the executable. Using the built-in `__SANITIZE_XXX__` or `__has_feature` for this task is more trouble than it's worth because only one of the two is available in most GCC/clang versions, alongside the lack of `__SANITIZE_UNDEFINED__` from GCC. Meson's own unit test execution sets its own `ASAN_OPTIONS` etc. To prevent it from overriding the default options, we also pass the same options to unit tests environment variables. A new script `ci/sanitizer-default-check.py` is used in CI to detect if a build directory with sanitizers enabled has a meson `executable` definition that doesn't include the sanitizer flag source file. Closes #5469 Merge branch '5469-embed-default-sanitizer-flags-in-the-executable' into 'main' See merge request isc-projects/bind9!10919 --- 7c60b7da8ac18fac33b1c0b049c13c57dcb7d2ff