Skip to content

Commit

Permalink
Add valgrind suppressions for ubuntu ARM
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aaronj0 committed Jan 28, 2025
1 parent 35bbfad commit 2756496
Show file tree
Hide file tree
Showing 5 changed files with 982 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ jobs:
echo "Running valgrind on passing tests"
CLANG_VERSION="${{ matrix.clang-runtime }}"
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind$( [[ "${{ matrix.os }}" == *"arm"* ]] && echo "_arm" ).supp"
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
export RETCODE=+$?
echo ::endgroup::
Expand Down
34 changes: 34 additions & 0 deletions etc/clang13-valgrind_arm.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
Cppyy Suppression
Memcheck:Free
fun:free
obj:*
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
fun:_ZL11WrapperCallPvmS_S_S_
fun:_ZN5Cppyy5CallVEPvS0_mS0_
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
fun:_PyObject_VectorcallTstate
fun:PyObject_Vectorcall
}

# To address:
# Mismatched free() / delete / delete []
# at 0x4878480: free (vg_replace_malloc.c:989)
# by 0x2C82F02B: ???
# Address 0x258d7f70 is 0 bytes inside a block of size 6 alloc'd
# at 0x4877194: operator new[](unsigned long) (vg_replace_malloc.c:729)
# by 0x2C82B057: ???
#
# On Ubuntu ARM, that also causes certain tests to fail.

{
Mismatched free()
Memcheck:Free
fun:free
obj:*
}
Loading

0 comments on commit 2756496

Please sign in to comment.