Skip to content

Commit 30daf31

Browse files
committed
Calm old Valgrind ...
Valgrind 3.15.0 on Ubuntu 20.04 reports a false positive [0] ``` ==7922== Conditional jump or move depends on uninitialised value(s) ==7922== at 0x461F0C: s_decode_header (pem_ssh.c:316) [...] ``` Simply suppress this false positive. [0] https://github.com/libtom/libtomcrypt/actions/runs/6507805191/job/17676616149?pr=587 Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 159e309 commit 30daf31

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.ci/Valgrind-Ubuntu_focal.supp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
<s_decode_header>
3+
Memcheck:Cond
4+
...
5+
fun:s_decode_header
6+
}

.ci/valgrind.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ echo "Run tests with valgrind..."
3131
for i in `seq 1 10` ; do sleep 300 && echo "Valgrind tests in Progress..."; done &
3232
alive_pid=$!
3333

34-
valgrind --error-exitcode=666 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all ./test >test_std.txt 2> >(tee -a test_err.txt >&2) || { kill $alive_pid; echo "Valgrind failed"; exit 1; }
34+
readonly VALGRIND_OPTS="--error-exitcode=666 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all"
35+
36+
readonly distro="$(lsb_release -si)_$(lsb_release -sc)"
37+
readonly suppfile=".ci/Valgrind-${distro}.supp"
38+
function get_suppfile() { [ -f "$suppfile" ] && echo "--suppressions=$suppfile" || echo ""; }
39+
readonly VALGRIND_EXTRA_OPTS=$(get_suppfile)
40+
41+
valgrind $VALGRIND_OPTS $VALGRIND_EXTRA_OPTS ./test >test_std.txt 2> >(tee -a test_err.txt >&2) || { kill $alive_pid; echo "Valgrind failed"; exit 1; }
3542

3643
kill $alive_pid
3744

0 commit comments

Comments
 (0)