Skip to content

Commit d47866d

Browse files
committed
[ci] Run tests under Valgrind Ubuntu x86
1 parent 5860e95 commit d47866d

File tree

2 files changed

+93
-2
lines changed

2 files changed

+93
-2
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: ubu24-analyzers
3434
os: ubuntu-24.04
3535
coverage: true
36-
extra_cmake_flags: -DCMAKE_BUILD_TYPE=Debug
36+
debug: on
3737
micromamba_shell_init: bash
3838
- name: ubu22
3939
os: ubuntu-22.04
@@ -77,6 +77,9 @@ jobs:
7777
if: ${{ runner.os != 'windows' }}
7878
run: |
7979
os="${{ matrix.os }}"
80+
if [[ "${{ matrix.debug }}" == "on" ]]; then
81+
echo "BUILD_TYPE=Debug" >> $GITHUB_ENV
82+
fi
8083
if [[ "${os}" == "macos"* ]]; then
8184
echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
8285
else
@@ -114,7 +117,7 @@ jobs:
114117
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
115118
-DXEUS_CPP_ENABLE_CODE_COVERAGE=${{ matrix.coverage }} \
116119
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
117-
${{ matrix.extra_cmake_flags }}
120+
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
118121
119122
- name: build, run C++ tests & install
120123
if: ${{ runner.os == 'windows' }}
@@ -133,6 +136,21 @@ jobs:
133136
cd build
134137
make install -j ${{ env.ncpus }}
135138
make -j ${{ env.ncpus }} check-xeus-cpp
139+
if [[ "${{ matrix.os }}" != "macos"* && "${{ matrix.debug }}" == "on" ]]; then
140+
sudo apt update
141+
sudo apt install libc6-dbg
142+
micromamba install -c conda-forge valgrind
143+
if [[ "${{ matrix.os }}" == *"arm"* ]]; then
144+
SUPPRESSION_FILE="${{ github.workspace }}/etc/xeus-cpp-valgrind_arm.supp"
145+
else
146+
SUPPRESSION_FILE="${{ github.workspace }}/etc/xeus-cpp-valgrind_x86.supp"
147+
fi
148+
valgrind --show-error-list=yes --track-origins=yes --error-exitcode=1 \
149+
--show-leak-kinds=definite,possible \
150+
--gen-suppressions=all \
151+
--suppressions="${SUPPRESSION_FILE}" \
152+
test/test_xeus_cpp
153+
fi
136154
137155
- name: Python tests Unix Systems
138156
if: ${{ runner.os != 'windows' }}

etc/xeus-cpp-valgrind_x86.supp

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
Suppression 1
3+
Memcheck:Addr8
4+
fun:memmove
5+
fun:copy
6+
fun:_S_copy
7+
fun:_S_copy_chars
8+
fun:_S_copy_chars
9+
fun:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag.isra.0
10+
fun:basic_string<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char> > >
11+
fun:str
12+
fun:operator std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char> > >::string_type
13+
fun:_ZN4xcpp11interpreter20inspect_request_implERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
14+
fun:_ZN4xeus12xinterpreter15inspect_requestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
15+
fun:_ZN21DOCTEST_ANON_SUITE_11L20DOCTEST_ANON_FUNC_14Ev
16+
fun:_ZN7doctest7Context3runEv
17+
fun:main
18+
}
19+
20+
{
21+
Suppression 2
22+
Memcheck:Addr2
23+
fun:memmove
24+
fun:copy
25+
fun:_S_copy
26+
fun:_S_copy_chars
27+
fun:_S_copy_chars
28+
fun:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag.isra.0
29+
fun:basic_string<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char> > >
30+
fun:str
31+
fun:operator std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char> > >::string_type
32+
fun:_ZN4xcpp11interpreter20inspect_request_implERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
33+
fun:_ZN4xeus12xinterpreter15inspect_requestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
34+
fun:_ZN21DOCTEST_ANON_SUITE_11L20DOCTEST_ANON_FUNC_14Ev
35+
fun:_ZN7doctest7Context3runEv
36+
fun:main
37+
}
38+
39+
{
40+
Suppression 3
41+
Memcheck:Cond
42+
fun:_ZN4llvm5APInt7setBitsEjj
43+
fun:_ZL16computeKnownBitsPKN4llvm5ValueERKNS_5APIntERNS_9KnownBitsEjRKNS_13SimplifyQueryE
44+
fun:_ZN4llvm16computeKnownBitsEPKNS_5ValueERNS_9KnownBitsERKNS_10DataLayoutEjPNS_15AssumptionCacheEPKNS_11InstructionEPKNS_13DominatorTreeEb
45+
fun:_ZNK4llvm12SelectionDAG13InferPtrAlignENS_7SDValueE
46+
fun:_ZN12_GLOBAL__N_111DAGCombiner9visitLOADEPN4llvm6SDNodeE
47+
fun:_ZN12_GLOBAL__N_111DAGCombiner7combineEPN4llvm6SDNodeE
48+
fun:_ZN4llvm12SelectionDAG7CombineENS_12CombineLevelEPNS_14BatchAAResultsENS_15CodeGenOptLevelE
49+
fun:_ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv
50+
fun:_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE
51+
fun:_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE
52+
fun:_ZN4llvm22SelectionDAGISelLegacy20runOnMachineFunctionERNS_15MachineFunctionE
53+
fun:_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE.part.0
54+
}
55+
56+
{
57+
Suppression 4
58+
Memcheck:Addr1
59+
fun:memmove
60+
fun:copy
61+
fun:_S_copy
62+
fun:_S_copy_chars
63+
fun:_S_copy_chars
64+
fun:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag.isra.0
65+
fun:basic_string<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char> > >
66+
fun:str
67+
fun:operator std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char> > >::string_type
68+
fun:_ZN4xcpp11interpreter20inspect_request_implERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
69+
fun:_ZN4xeus12xinterpreter15inspect_requestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
70+
fun:_ZN21DOCTEST_ANON_SUITE_11L20DOCTEST_ANON_FUNC_14Ev
71+
fun:_ZN7doctest7Context3runEv
72+
fun:main
73+
}

0 commit comments

Comments
 (0)