Skip to content

Commit

Permalink
tarantool: work around LeakSanitizer internal errors (#12321)
Browse files Browse the repository at this point in the history
With enabled LeakSanitizer on AArch64 ICU build fails due to false
positive warnings from Leak Sanitizer (part of config.log):

```
configure:3209: checking whether we are cross compiling configure:3217: clang -o conftest -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link  -lpthread conftest.c  >&5 configure:3221: $? = 0
configure:3228: ./conftest
==666==LeakSanitizer has encountered a fatal error. ==666==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1 ==666==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc) configure:3232: $? = 1
configure:3239: error: in `/src/tarantool/build/icu': configure:3241: error: cannot run C compiled programs.
```

The patch disable LeakSanitizer on AArch64 and increase verbosity.

Related to #11798
Related to google/sanitizers#723
  • Loading branch information
ligurio authored Aug 14, 2024
1 parent c4fa2d4 commit 758349e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/tarantool/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ case $SANITIZER in
*) SANITIZERS_ARGS="" ;;
esac

export LSAN_OPTIONS="verbosity=1:log_threads=1"

# Workaround for a LeakSanitizer crashes,
# see https://github.com/google/oss-fuzz/issues/11798.
if [ "$ARCHITECTURE" = "aarch64" ]; then
export ASAN_OPTIONS=detect_leaks=0
fi

: ${LD:="${CXX}"}
: ${LDFLAGS:="${CXXFLAGS}"} # to make sure we link with sanitizer runtime

Expand Down

0 comments on commit 758349e

Please sign in to comment.