AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

ci: Temporarily use clang in valgrind tasks

Public commit record

What the developer wrote

Authored by MarcoFalke

100/100 · Strong
ci: Temporarily use clang in valgrind tasks

valgrind currently does not work on GCC -O2 compiled executables, which
contain std::optional use, due to an upstream bug. See
https://bugs.kde.org/show_bug.cgi?id=472329

One workaround could be to use -O1. However, that seems brittle, as
variantions of the bug were seen with -O1 as well.

So temporarily use clang in the valgrind CI tasks, because this also
allows to drop a false-positive suppression for:
-DCMAKE_CXX_FLAGS='-Wno-error=array-bounds'

Also, update the comment in contrib/valgrind.supp to mention the
background:

* GCC -O2 wasn't tested with the suppressions file, due to the mentioned
bug.
* Clang-17 (or later) on aarch64 wasn't tested due to bug
https://github.com/bitcoin/bitcoin/issues/29635 and the minimum
supported clang version is clang-17 right now.
* GUI isn't tested, because it requires a debug build, see the prior
commit.

This means the only tested config right now is the one mentioned in the
suppression file.
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit only changes Bitcoin Core's continuous-integration (CI) test setup. It switches the compiler used during Valgrind memory-checking jobs from GCC to Clang, because a known bug in Valgrind makes it report false problems on GCC-optimized executables that use std::optional. No user-facing code, consensus rules, wallet, networking, or node behavior is changed. There is no security vulnerability being fixed or introduced here.

Recommended action

No security action required. This is a CI maintenance change. Reviewers may verify that the new Clang-based Valgrind jobs pass and that the suppression file comment accurately reflects the tested configuration.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.