Skip to content

Commit

Permalink
[ci] Make valgrind check stricter (#3536)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Nov 7, 2020
1 parent da6c6ea commit c0ffb71
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .ci/test_r_package_valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,21 @@ if [[ ${bytes_possibly_lost} -gt 352 ]]; then
echo "valgrind found ${bytes_possibly_lost} bytes possibly lost"
exit -1
fi

invalid_reads=$(
cat ${VALGRIND_LOGS_FILE} \
| grep --count -i "Invalid read"
)
if [[ ${invalid_reads} -gt 0 ]]; then
echo "valgrind found invalid reads: ${invalid_reads}"
exit -1
fi

invalid_writes=$(
cat ${VALGRIND_LOGS_FILE} \
| grep --count -i "Invalid write"
)
if [[ ${invalid_writes} -gt 0 ]]; then
echo "valgrind found invalid writes: ${invalid_writes}"
exit -1
fi

0 comments on commit c0ffb71

Please sign in to comment.