Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Make valgrind check stricter #3536

Merged
merged 1 commit into from
Nov 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/gha run r-valgrind