From 0b0d31bd4bf5ca02077a3bacdc01e963355fc75c Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Mon, 9 Nov 2026 16:34:29 +0100 Subject: [PATCH 1/2] [ci] Add clang23 aarch64 valgrind suppressions --- .github/valgrind/clang23-valgrind_arm.supp | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/valgrind/clang23-valgrind_arm.supp diff --git a/.github/valgrind/clang23-valgrind_arm.supp b/.github/valgrind/clang23-valgrind_arm.supp new file mode 100644 index 0000000..771533f --- /dev/null +++ b/.github/valgrind/clang23-valgrind_arm.supp @@ -0,0 +1,42 @@ +# aarch64 companion to cppinterop-clang23-valgrind.supp, loaded by the CI +# composite on arm valgrind cells as clang23-valgrind_arm.supp. +# +# clang-23 reads uninitialised bytes in several Sema and AST paths that +# stay clean on x86_64 but trip on aarch64, so the shared file's +# llvm/llvm-project#194147 family does not cover them. Unlike the +# clang-22 arm file, this cell's libclangCppInterOp.so now carries local +# symbol names, so these are anchored by function name like the x86_64 +# file rather than on obj: frames. Taken from valgrind's +# --gen-suppressions output on the arm nightly (7 contexts, all under +# type deduction, auto return-type synthesis, and concept checking). +# +# Drop together with the #194147 family once the upstream fix lands. + +{ + llvm/llvm-project#194147: getAutoType FoldingSet compare (aarch64) + Memcheck:Cond + fun:bcmp + fun:_ZNK4llvm16FoldingSetNodeIDeqERKS0_ + fun:_ZNK5clang10ASTContext11getAutoTypeENS_11DeducedKindENS_8QualTypeENS_15AutoTypeKeywordEPNS_12TemplateDeclEN4llvm8ArrayRefINS_16TemplateArgumentEEE + ... +} +{ + llvm/llvm-project#194147: GetDeclSpecTypeForDeclarator (aarch64) + Memcheck:Cond + fun:_ZL28GetDeclSpecTypeForDeclaratorRN12_GLOBAL__N_119TypeProcessingStateERPN5clang14TypeSourceInfoE + fun:_ZN5clang4Sema20GetTypeForDeclaratorERNS_10DeclaratorE + ... +} +{ + llvm/llvm-project#194147: AutoTypeLoc::getLocalSourceRange (aarch64) + Memcheck:Value8 + fun:_ZNK5clang11AutoTypeLoc19getLocalSourceRangeEv + fun:_ZN5clang7TypeLoc23getLocalSourceRangeImplES0_ + ... +} +{ + llvm/llvm-project#194147: BuildExprRequirement constraint check (aarch64) + Memcheck:Cond + fun:_ZN5clang4Sema20BuildExprRequirementEPNS_4ExprEbNS_14SourceLocationENS_8concepts15ExprRequirement21ReturnTypeRequirementE + ... +} From fbb42584a2fdb5a8ff746962cfcc7806560ebeb1 Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Thu, 3 Dec 2026 15:06:40 +0100 Subject: [PATCH 2/2] [ci] Suppress aarch64 glibc string-primitive valgrind false positives --- .github/valgrind/valgrind-cppjit-cling.supp | 52 +++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.github/valgrind/valgrind-cppjit-cling.supp b/.github/valgrind/valgrind-cppjit-cling.supp index 30ab362..56cab4d 100644 --- a/.github/valgrind/valgrind-cppjit-cling.supp +++ b/.github/valgrind/valgrind-cppjit-cling.supp @@ -887,3 +887,55 @@ fun:_ZN4llvm25FunctionToLoopPassAdaptor3runERNS_8FunctionERNS_15AnalysisManagerIS1_JEEE fun:_ZN4llvm6detail9PassModelINS_8FunctionENS_25FunctionToLoopPassAdaptorENS_15AnalysisManagerIS2_JEEEJEE3runERS2_RS5_ } + +# +# aarch64 glibc string-primitive false positives. On arm64 glibc's +# word-at-a-time wcsncpy, strncmp and strnlen load an aligned word that +# reaches past the end of the string, still inside the mapped buffer. The +# trailing bytes never change the result. Memcheck reports the compare as +# depending on uninitialised values anyway. These reproduce with cppjit +# absent (python3 -c pass, tput, os.putenv run under valgrind) and only on +# conda-forge valgrind 3.28 on aarch64. apt valgrind 3.22 does not report +# them. x86_64 is unaffected. CPython carries the sibling wcscmp block in +# Misc/valgrind-python.supp. Remove these once a later valgrind stops +# flagging the glibc arm64 string routines. +# +{ + aarch64-cpython-pathconfig-wcsncpy + Memcheck:Cond + fun:wcsncpy + fun:wcsncpy + fun:_Py_w* +} +{ + aarch64-ncurses-terminfo-strnlen + Memcheck:Cond + fun:strnlen + fun:__printf_buffer + fun:__vsprintf_internal +} +{ + aarch64-glibc-vsnprintf-strnlen + Memcheck:Cond + fun:strnlen + fun:__printf_buffer + fun:__vsnprintf_internal +} +{ + aarch64-glibc-setenv-strncmp + Memcheck:Cond + fun:strncmp + fun:__add_to_environ +} +{ + aarch64-glibc-unsetenv-strncmp + Memcheck:Cond + fun:strncmp + fun:unsetenv +} +{ + aarch64-glibc-getenv-strncmp + Memcheck:Cond + fun:strncmp + fun:getenv +}