From: Emil Velikov Date: Fri, 23 May 2025 11:01:29 +0000 (+0100) Subject: scripts/sanitizer-env.sh: remove incorrect $CC quotes X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbc686e8b337bc93679b2b57c32f7cd22e935915;p=thirdparty%2Fkmod.git 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 --- 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