mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
configure: allow to run clang with ASAN
Prefer adding LSAN_OPTIONS="suppressions=$PWD/tests/sanitizer_suppressions/lsan" when CC=clang instead. Changelog-Added: build: clang build now supports --enable-address-sanitizer . Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
parent
5a87e88ee5
commit
3382dafaee
4
configure
vendored
4
configure
vendored
@ -223,10 +223,6 @@ $CC ${CWARNFLAGS-$BASE_WARNFLAGS} $CDEBUGFLAGS $COPTFLAGS -o $CONFIGURATOR $CONF
|
||||
echo "done"
|
||||
|
||||
if [ "$ASAN" = "1" ]; then
|
||||
if [ "$CC" = "clang" ]; then
|
||||
echo "Address sanitizer (ASAN) is currently only supported with gcc"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$VALGRIND" = "1" ]; then
|
||||
echo "Address sanitizer (ASAN) and valgrind cannot be enabled at the same time"
|
||||
exit 1
|
||||
|
3
contrib/sanitizer_suppressions/asan
Normal file
3
contrib/sanitizer_suppressions/asan
Normal file
@ -0,0 +1,3 @@
|
||||
# process_check_funding_broadcast is racy as it operates on a data that may be
|
||||
# freed under its feet
|
||||
interceptor_via_fun:process_check_funding_broadcast
|
3
contrib/sanitizer_suppressions/lsan
Normal file
3
contrib/sanitizer_suppressions/lsan
Normal file
@ -0,0 +1,3 @@
|
||||
# Clang would detect false positive here, due to padding. See https://github.com/ElementsProject/lightning/pull/2285
|
||||
leak:ccan/ccan/autodata/autodata.c
|
||||
leak:ccan/ccan/htable/htable.c
|
Loading…
Reference in New Issue
Block a user