From d767c6bea1c292358498a0a7093a75361ed3db26 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 23 Oct 2022 23:26:31 +0200 Subject: [PATCH] gitlab-ci: Fix llvm-symbolizer Newer versions of llvm-symbolizer require libxml2 themselves. Running a test program with LD_LIBRARY_PATH set to .libs makes llvm-symbolizer pick up the tested development version of libxml2 which breaks completely if the build is instrumented with ASan. Add a wrapper script that invokes llvm-symbolizer with an empty LD_LIBRARY_PATH. --- .gitlab-ci.yml | 1 + .gitlab-ci/llvm-symbolizer | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 .gitlab-ci/llvm-symbolizer diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 822f31bb..dc2d4092 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,6 +41,7 @@ clang:asan: # LeakSanitizer requires SYS_CAP_PTRACE ASAN_OPTIONS: "detect_leaks=0" UBSAN_OPTIONS: "print_stacktrace=1" + ASAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer" # Disabled, MSan seems broken on Ubntu 22.04 .clang:msan: diff --git a/.gitlab-ci/llvm-symbolizer b/.gitlab-ci/llvm-symbolizer new file mode 100755 index 00000000..cfc85e8d --- /dev/null +++ b/.gitlab-ci/llvm-symbolizer @@ -0,0 +1,9 @@ +#!/bin/sh + +# Newer versions of llvm-symbolizer require libxml2 themselves. Running +# a test program with LD_LIBRARY_PATH set to .libs makes llvm-symbolizer +# pick up the tested development version of libxml2 which breaks +# completely if the build is instrumented with ASan. This wrapper script +# invokes llvm-symbolizer with an empty LD_LIBRARY_PATH. + +LD_LIBRARY_PATH='' llvm-symbolizer "$@"