From c055f1acdd1af5a03408c1b67743abc3b4bdf7a8 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Sat, 17 Jun 2023 23:38:09 -0400 Subject: [PATCH] FIX GHA clang failures for clang 14 - remove explicit conversion, seems to cause clang 14 to fail - base path of LD_PRELOAD based on major version of clang instead of hard-coded 11 Closes #5400 --- ci/github/run_usan_clang.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ci/github/run_usan_clang.sh b/ci/github/run_usan_clang.sh index 70652ba0b7e..296c44ffc05 100644 --- a/ci/github/run_usan_clang.sh +++ b/ci/github/run_usan_clang.sh @@ -1,8 +1,12 @@ #!/usr/bin/env bash set -e - +CLANG_FULL_VER=`clang --version` +echo $CLANG_FULL_VER +echo `cat /etc/os-release` +export CLANG_VER=`clang --version | perl -lne 'print $1 if /version (\d+)/'` +echo "Clang major version is: $CLANG_VER" # Enable undefined behaviour sanitizer using traps -CFLAGS_USAN="-g3 -O0 -mtune=generic -fno-omit-frame-pointer -fsanitize=undefined,implicit-conversion -fsanitize-undefined-trap-on-error -fno-sanitize-recover=implicit-conversion" +CFLAGS_USAN="-g3 -O0 -mtune=generic -fno-omit-frame-pointer -fsanitize=undefined -fsanitize-undefined-trap-on-error -fno-sanitize-recover" LDFLAGS_STD="-Wl,-Bsymbolic-functions -Wl,-z,relro" # Sanitizer options to continue avoid stopping the runs on leaks (expected on postgres binaries) @@ -10,7 +14,8 @@ export ASAN_OPTIONS=halt_on_error=false,leak_check_at_exit=false,exitcode=0 export MSAN_OPTIONS=halt_on_error=false,leak_check_at_exit=false,exitcode=0 #Run postgres preloading sanitizer libs -LD_PRELOAD=/usr/lib/clang/11/lib/linux/libclang_rt.asan-x86_64.so \ +LD_PRELOAD=/usr/lib/clang/${CLANG_VER}/lib/linux/libclang_rt.asan-x86_64.so + /usr/local/pgsql/bin/pg_ctl -c -o '-F' -l /tmp/logfile start