Skip to content

Commit 3382daf

Browse files
darosiorrustyrussell
authored andcommitted
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>
1 parent 5a87e88 commit 3382daf

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

configure

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,6 @@ $CC ${CWARNFLAGS-$BASE_WARNFLAGS} $CDEBUGFLAGS $COPTFLAGS -o $CONFIGURATOR $CONF
223223
echo "done"
224224

225225
if [ "$ASAN" = "1" ]; then
226-
if [ "$CC" = "clang" ]; then
227-
echo "Address sanitizer (ASAN) is currently only supported with gcc"
228-
exit 1
229-
fi
230226
if [ "$VALGRIND" = "1" ]; then
231227
echo "Address sanitizer (ASAN) and valgrind cannot be enabled at the same time"
232228
exit 1

contrib/sanitizer_suppressions/asan

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# process_check_funding_broadcast is racy as it operates on a data that may be
2+
# freed under its feet
3+
interceptor_via_fun:process_check_funding_broadcast

contrib/sanitizer_suppressions/lsan

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Clang would detect false positive here, due to padding. See https://github.com/ElementsProject/lightning/pull/2285
2+
leak:ccan/ccan/autodata/autodata.c
3+
leak:ccan/ccan/htable/htable.c

0 commit comments

Comments
 (0)