fish-shell/cmake
Mahmoud Al-Qudsi 91cf526d23
Enable rust address sanitizer for asan ci job (#9643)
Rust has multiple sanitizers available (with llvm integration).
-Zsanitizer=address catches the most likely culprits but we may want to set up a
separate job w/ -Zsanitizer=memory to catch uninitialized reads.

It might be necessary to execute `cargo build` as `cargo build -Zbuild-std` to
get full coverage.

When we're linking against the hybrid C++ codebase, the sanitizer library is
injected into the binary by also include `-fsanitize=address` in CXXFLAGS - we
do *not* want to manually opt-into `-lasan`. We also need to manually specify
the desired target triple as a CMake variable and then explicitly pass it to all
`cargo` invocations if building with ASAN.

Corrosion has been patched to make sure it follows these rules.

The `cargo-test` target is failing to link under ASAN. For some reason it has
autocxx/ffi dependencies even though only rust-native, ffi-free code should be
tested (and one would think the situation wouldn't change depending on the
presence of the sanitizer flag). It's been disabled under ASAN for now.
2023-03-06 18:15:36 -06:00
..
checks Optimize away a str2wcs_internal check 2020-09-07 18:05:18 -05:00
Benchmark.cmake Use lowercase CMake function names 2020-03-14 16:11:35 -07:00
CheckIncludeFiles.cmake :Revert "Remove CheckIncludeFiles.cmake" 2022-01-19 11:41:16 -08:00
ConfigureChecks.cmake Correctly query termios.h and ioctl.h for struct winsize 2022-10-14 22:07:03 -05:00
Docs.cmake docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
gettext.cmake cmake: disable frameworks when searching for libintl 2022-03-26 22:00:44 +08:00
Install.cmake Remove obsolete lynx bug mitigation 2023-01-01 19:41:41 -08:00
Mac.cmake Revert "Update Mac.cmake" 2022-01-03 08:08:41 -08:00
MacApp.cmake Group certain cmake targets into folders 2021-03-21 13:29:41 -07:00
PCRE2.cmake Revert "cmake: Use pcre2 tag directly" 2022-10-28 17:59:08 -05:00
Rust.cmake Enable rust address sanitizer for asan ci job (#9643) 2023-03-06 18:15:36 -06:00
Tests.cmake Enable rust address sanitizer for asan ci job (#9643) 2023-03-06 18:15:36 -06:00
Version.cmake Use lowercase CMake function names 2020-03-14 16:11:35 -07:00