mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
configure: abort on UBSan failure
By default, UBSan reports runtime errors but does not stop execution. We already abort in debug builds, and this commit makes us also abort in regular builds when UBSan is enabled. Arguably, this is what users expect when they enable UBSan, so it is a good default. I know I've missed some UBSan bugs in the past because of this issue, and dergoegge mentioned that this also happened to him.
This commit is contained in:
parent
d759f3b758
commit
968d6d6d24
1 changed files with 1 additions and 4 deletions
5
configure
vendored
5
configure
vendored
|
@ -165,10 +165,7 @@ set_defaults()
|
|||
fi
|
||||
fi
|
||||
if [ "$UBSAN" != 0 ]; then
|
||||
CSANFLAGS="$CSANFLAGS -fsanitize=undefined"
|
||||
if [ "$DEBUGBUILD" != 0 ]; then
|
||||
CSANFLAGS="$CSANFLAGS -fno-sanitize-recover=undefined"
|
||||
fi
|
||||
CSANFLAGS="$CSANFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
|
||||
fi
|
||||
if [ "$FUZZING" != 0 ]; then
|
||||
FUZZFLAGS="-fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
|
||||
|
|
Loading…
Add table
Reference in a new issue