Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable ASAN when building with clang #4013

Merged
merged 2 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions contrib/sanitizer_suppressions/asan
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 0 deletions contrib/sanitizer_suppressions/lsan
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion openingd/dualopend.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
struct penalty_base *pbase;
struct amount_msat our_msats;
struct amount_sat total;
u8 msg_type;
enum dualopend_wire msg_type;

state->our_role = ACCEPTER;
open_tlv = tlv_opening_tlvs_new(tmpctx);
Expand Down