Skip to content

Commit

Permalink
FIX GHA clang failures for clang 14
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
robe2 committed Jun 18, 2023
1 parent b038892 commit c055f1a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ci/github/run_usan_clang.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
#!/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)
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


Expand Down

0 comments on commit c055f1a

Please sign in to comment.