From dbc686e8b337bc93679b2b57c32f7cd22e935915 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 23 May 2025 12:01:29 +0100 Subject: [PATCH] scripts/sanitizer-env.sh: remove incorrect $CC quotes On Arch (at least) the shell chokes when the CC variable contains space, for the given construct - $("$CC" foobar). Since we variable is likely to contain the executable and arguments, the quotation is wrong. Drop it and ultimately resolve the LD_PRELOAD issues... That said, the tests still fail over here, segfault-ing in (or due to) the LD_PRELOAD library init-modules.so. Fixes: f5b4ff82 ("Add support for clang sanitizers") Fixes: c7686797 ("scripts/sanitizer-env.sh: support new clang 19 DSO") Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/365 Signed-off-by: Lucas De Marchi --- scripts/sanitizer-env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/sanitizer-env.sh b/scripts/sanitizer-env.sh index 2fbebc55..6d26907c 100755 --- a/scripts/sanitizer-env.sh +++ b/scripts/sanitizer-env.sh @@ -3,12 +3,12 @@ # set -euo pipefail # don't set these, since this script is sourced if [[ ${CC-} == *gcc* ]]; then - OUR_PRELOAD=$("$CC" -print-file-name=libasan.so) + OUR_PRELOAD=$($CC -print-file-name=libasan.so) elif [[ ${CC-} == *clang* ]]; then # With v19, the library lacks the CPU arch in its name - OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan.so) + OUR_PRELOAD=$($CC -print-file-name=libclang_rt.asan.so) if ! test -f "$OUR_PRELOAD"; then - OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan-x86_64.so) + OUR_PRELOAD=$($CC -print-file-name=libclang_rt.asan-x86_64.so) fi else cat <<- EOF >&2 -- 2.47.3