Fix #12327 FP memleak when storing pointer in object / #12332 FN memleak for allocation functions with std:: prefix #10093
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners | |
name: valgrind | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'releases/**' | |
tags: | |
- '2.*' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ github.workflow }}-${{ runner.os }} | |
- name: Install missing software | |
run: | | |
sudo apt-get update | |
sudo apt-get install libxml2-utils | |
sudo apt-get install valgrind | |
sudo apt-get install libboost-container-dev | |
sudo apt-get install debuginfod | |
- name: Build cppcheck | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
CXXFLAGS="-O1 -g -w -DHAVE_BOOST" make -j$(nproc) HAVE_RULES=yes MATCHCOMPILER=yes | |
- name: Build test | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
CXXFLAGS="-O1 -g -w -DHAVE_BOOST" make -j$(nproc) testrunner HAVE_RULES=yes MATCHCOMPILER=yes | |
- name: Run valgrind | |
run: | | |
ec=0 | |
valgrind --error-limit=yes --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --suppressions=valgrind/testrunner.supp --gen-suppressions=all --log-fd=9 --error-exitcode=42 ./testrunner TestGarbage TestOther TestSimplifyTemplate 9>memcheck.log || ec=1 | |
cat memcheck.log | |
exit $ec | |
env: | |
DEBUGINFOD_URLS: https://debuginfod.ubuntu.com | |
- uses: actions/upload-artifact@v3 | |
if: success() || failure() | |
with: | |
name: Logs | |
path: ./*.log |