Skip to content

Commit

Permalink
adding valgrind invalid read/write, conditionnal jumps and unclosed fds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ximaz committed May 2, 2024
1 parent 655b428 commit d8bd854
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
run: "[[ $(grep -E \"^tests_run:\" Makefile) == \"\" ]] && exit 0 || make tests_run"

- name: "Run valgrind"
run: "[ -f \"${{ env.UNIT_TESTS }}\" ] && valgrind -s --leak-check=full --track-origins=yes --read-var-info=yes --trace-children=yes --show-leak-kinds=all --read-inline-info=yes --errors-for-leak-kinds=all ${{ env.UNIT_TESTS }} 2>${{ env.VALGRIND_REPORTS }}"
run: "[ -f \"${{ env.UNIT_TESTS }}\" ] && valgrind -s --leak-check=full --track-origins=yes --read-var-info=yes --trace-children=yes --show-leak-kinds=all --read-inline-info=yes --errors-for-leak-kinds=all --track-fds=yes ${{ env.UNIT_TESTS }} 2>${{ env.VALGRIND_REPORTS }}"

- name: "Analyze valgrind report"
run: |
Expand All @@ -149,6 +149,10 @@ jobs:
fi
if [[ $(echo "${line}" | grep '^==.*== .* bytes in .* blocks are definitely lost in loss record .* of .*$') ]]; then
block="${line}"
elif [[ $(echo "${line}" | grep '^==.*== Invalid .* of size .*$') ]]; then
block="${line}"
elif [[ $(echo "${line}" | grep '^==.*== Open file descriptor .*: .*$') ]]; then
block="${line}"
fi
done < ${{ env.VALGRIND_REPORTS }}
exit "${status}"
Expand Down

0 comments on commit d8bd854

Please sign in to comment.