Skip to content

Commit 01be0e0

Browse files
committed
Add valgrind suppressions for ubuntu ARM
This stems from a mismatched free() context causing 3 errors with all LLVM versions (13, 17, 18, 19). The suppression files are made seperate so we do not regress mismatched free() memory errors on non-ARM builds
1 parent 8e043c5 commit 01be0e0

File tree

5 files changed

+988
-1
lines changed

5 files changed

+988
-1
lines changed

.github/workflows/Ubuntu.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,13 @@ jobs:
643643
644644
echo "Running valgrind on passing tests"
645645
CLANG_VERSION="${{ matrix.clang-runtime }}"
646-
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
646+
647+
if [[ "${{ matrix.os }}" == *"arm"* ]]; then
648+
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind_arm.supp"
649+
else
650+
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
651+
fi
652+
647653
valgrind --show-error-list=yes --error-exitcode=1 --track-origins=yes --gen-suppressions=all --suppressions="${SUPPRESSION_FILE}" --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -sv -ra
648654
export RETCODE=+$?
649655
echo ::endgroup::

etc/clang13-valgrind_arm.supp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
Cppyy Suppression
3+
Memcheck:Free
4+
fun:free
5+
obj:*
6+
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
7+
fun:_ZL11WrapperCallPvmS_S_S_
8+
fun:_ZN5Cppyy5CallVEPvS0_mS0_
9+
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
10+
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
11+
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
12+
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
13+
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
14+
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
15+
fun:_PyObject_VectorcallTstate
16+
fun:PyObject_Vectorcall
17+
}
18+
19+
# To address:
20+
# Mismatched free() / delete / delete []
21+
# at 0x4878480: free (vg_replace_malloc.c:989)
22+
# by 0x2C82F02B: ???
23+
# Address 0x258d7f70 is 0 bytes inside a block of size 6 alloc'd
24+
# at 0x4877194: operator new[](unsigned long) (vg_replace_malloc.c:729)
25+
# by 0x2C82B057: ???
26+
#
27+
# On Ubuntu ARM, that also causes certain tests to fail.
28+
29+
{
30+
Mismatched free()
31+
Memcheck:Free
32+
fun:free
33+
obj:*
34+
}

0 commit comments

Comments
 (0)