Skip to content

Commit f1c4ff5

Browse files
committed
Use a valgrind suppressions file to work around libstd uninit access
1 parent 255e427 commit f1c4ff5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

genbindings.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ if $RUN_CPP_TESTS; then
349349
if [ "$2" = "true" ]; then
350350
g++ $LOCAL_CFLAGS -std=c++11 -Wall -g -pthread -DREAL_NET -I../ldk-net ldk_net.o demo.cpp target/debug/libldk.a -ldl -lm
351351
if [ -x "`which valgrind`" -a "$(uname -m)" != "ppc64le" ]; then
352-
valgrind --error-exitcode=4 --memcheck:leak-check=full --show-leak-kinds=all ./a.out
352+
valgrind --suppressions=valgrind-suppressions.txt --error-exitcode=4 --memcheck:leak-check=full --show-leak-kinds=all ./a.out
353353
echo
354354
else
355355
echo "WARNING: Please install valgrind for more testing"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
Apparently rust stdlib accesses uninitialized values while debug'ing a duration
3+
Memcheck:Cond
4+
...
5+
fun:_ZN57_$LT$core..time..Duration$u20$as$u20$core..fmt..Debug$*
6+
}

0 commit comments

Comments
 (0)