@@ -514,20 +514,23 @@ if [ "$HOST_PLATFORM" = "x86_64-unknown-linux-gnu" ]; then
514514 RUSTFLAGS=" $RUSTFLAGS --cfg=test_mod_pointers" RUSTC_BOOTSTRAP=1 cargo rustc $CARGO_BUILD_ARGS -v -- -Zsanitizer=address -Cforce-frame-pointers=yes || ( mv Cargo.toml.bk Cargo.toml; exit 1)
515515 mv Cargo.toml.bk Cargo.toml
516516
517- # First the C demo app...
518- $CLANG $LOCAL_CFLAGS -fsanitize=address -g demo.c target/debug/libldk.a -ldl
519- ASAN_OPTIONS=' detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' ./a.out
517+ # Sadly, address sanitizer appears to have had some regression on Debian and now fails to
518+ # get past its init stage, so we disable it for now.
520519
521- if [ " $2 " = " true" ]; then
522- # ...then the C++ demo app
523- $CLANGPP $LOCAL_CFLAGS -std=c++11 -fsanitize=address -g demo.cpp target/debug/libldk.a -ldl
524- ASAN_OPTIONS=' detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' ./a.out > /dev/null
525-
526- # ...then the C++ demo app with the ldk_net network implementation
527- $CLANG $LOCAL_CFLAGS -fPIC -fsanitize=address -g -I../ldk-net ../ldk-net/ldk_net.c -c -o ldk_net.o
528- $CLANGPP $LOCAL_CFLAGS -std=c++11 -fsanitize=address -g -DREAL_NET -I../ldk-net ldk_net.o demo.cpp target/debug/libldk.a -ldl
529- ASAN_OPTIONS=' detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' ./a.out > /dev/null
530- fi
520+ # First the C demo app...
521+ # $CLANG $LOCAL_CFLAGS -fsanitize=address -g demo.c target/debug/libldk.a -ldl
522+ # ASAN_OPTIONS='detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' ./a.out
523+
524+ # if [ "$2" = "true" ]; then
525+ # # ...then the C++ demo app
526+ # $CLANGPP $LOCAL_CFLAGS -std=c++11 -fsanitize=address -g demo.cpp target/debug/libldk.a -ldl
527+ # ASAN_OPTIONS='detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' ./a.out >/dev/null
528+
529+ # # ...then the C++ demo app with the ldk_net network implementation
530+ # $CLANG $LOCAL_CFLAGS -fPIC -fsanitize=address -g -I../ldk-net ../ldk-net/ldk_net.c -c -o ldk_net.o
531+ # $CLANGPP $LOCAL_CFLAGS -std=c++11 -fsanitize=address -g -DREAL_NET -I../ldk-net ldk_net.o demo.cpp target/debug/libldk.a -ldl
532+ # ASAN_OPTIONS='detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' ./a.out >/dev/null
533+ # fi
531534 else
532535 echo " WARNING: Please install clang-$RUSTC_LLVM_V and clang++-$RUSTC_LLVM_V to build with address sanitizer"
533536 fi
0 commit comments