ci: build libFuzzer from source for MSan task #37091

Open
fanquake wants to merge 2 commits from msan_ci_build_libfuzzer into master AGit
fanquake commented 2026-12-03 11:18:48 +00:00 (Migrated from github.com)

The libFuzzer shipped by apt.llvm.org is built against libstdc++, rather
libc++, so fails to link against the instrumented libc++.

The libFuzzer shipped by apt.llvm.org is built against libstdc++, rather libc++, so fails to link against the instrumented libc++.
DrahtBot commented 2026-12-03 11:18:58 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #35957 (ci: Enable Boost.MultiIndex invariant-checking mode by hebasto)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/37091 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/37091.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/37091#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. A summary of reviews will appear here. <!--174a7506f384e20aa4161008e828411d--> ### Conflicts Reviewers, this pull request conflicts with the following ones: * [#35957](https://github.com/bitcoin/bitcoin/pull/35957) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35957.svg"></sub> (ci: Enable Boost.MultiIndex invariant-checking mode by hebasto) If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

🔵 Suggestion · The MSan libFuzzer revert leaves the earlier false-positive rationale unanswered

The series explains a link fix but does not say whether restoring fuzzer,memory addresses the undiagnosed MSan false positives behind fa70e23 or knowingly retries the previous tradeoff.

Location: ci/test/00_setup_env_native_fuzz_with_msan.sh:25 (head).

🔵 Suggestion · The TSan and plain MSan images also build unused libFuzzer archives

Gating the new libFuzzer build on USE_INSTRUMENTED_LIBCPP adds an unnecessary compiler-rt configure, build and archive replacement to the TSan and non-fuzz MSan image builds.

Location: ci/test/01_base_install.sh:93 (head).

Review coverage was incomplete.


Reviewed: 2f97d87cdbd9 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:e1a29e5e677c47d383756f0fcf8f3760725c91d1104dd3ccb2f333b6217eba26:47880f5569fd2047d249266f337c4f2a509adf7d96c3ccb1c7644c2c2a650bff --> <!-- ralph-base:2c0b8c4efc56ed530d5b69fc6d0f23cf79eaf77c --> <!-- ralph-head:2f97d87cdbd9174f2cf4d61a14dbfca98b447ab5 --> <!-- ralph-case:486d69087d24213be0a1a480351352c2da2f6207ae99bacc5a7ed13e4ac7c559 --> **🔵 Suggestion · The MSan libFuzzer revert leaves the earlier false-positive rationale unanswered** The series explains a link fix but does not say whether restoring `fuzzer,memory` addresses the undiagnosed MSan false positives behind `fa70e23` or knowingly retries the previous tradeoff. Location: [`ci/test/00_setup_env_native_fuzz_with_msan.sh:25`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/2f97d87cdbd9174f2cf4d61a14dbfca98b447ab5/ci/test/00_setup_env_native_fuzz_with_msan.sh#L25>) (head). **🔵 Suggestion · The TSan and plain MSan images also build unused libFuzzer archives** Gating the new libFuzzer build on `USE_INSTRUMENTED_LIBCPP` adds an unnecessary compiler-rt configure, build and archive replacement to the TSan and non-fuzz MSan image builds. Location: [`ci/test/01_base_install.sh:93`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/2f97d87cdbd9174f2cf4d61a14dbfca98b447ab5/ci/test/01_base_install.sh#L93>) (head). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`2f97d87cdbd9`](<https://git.fish.foo/bitcoin/bitcoin/commit/2f97d87cdbd9174f2cf4d61a14dbfca98b447ab5>) · [Review report](<https://review.fish.foo/report/37091-2f97d87cdbd9174f2cf4d61a14dbfca98b447ab5-3482-2.html>) · [Previous reports](<https://review.fish.foo/traces/37091/>) [permalink](<https://review.fish.foo/report/37091-2f97d87cdbd9174f2cf4d61a14dbfca98b447ab5-3482-2.html>)
maflcko (Migrated from github.com) reviewed 2026-12-03 11:41:01 +00:00
maflcko (Migrated from github.com) left a comment

thx, lgtm

thx, lgtm
maflcko (Migrated from github.com) commented 2026-12-03 11:40:36 +00:00

nit: maybe set COMPILER_RT_USE_LIBCXX=ON explicitly and combine this with the above build to unconditionally build all three:

-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;compiler-rt"

?

This means a sanitizer is needed to get libfuzzer and every sanitizer will have a possibly unused libfuzzer, but that shouldn't matter, because the system libfuzzer is also installed and sits there unused.

nit: maybe set COMPILER_RT_USE_LIBCXX=ON explicitly and combine this with the above build to unconditionally build all three: ``` -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;compiler-rt" ``` ? This means a sanitizer is needed to get libfuzzer and every sanitizer will have a possibly unused libfuzzer, but that shouldn't matter, because the system libfuzzer is also installed and sits there unused.
maflcko (Migrated from github.com) commented 2026-12-03 11:40:49 +00:00

nit: Long option name --machine.

nit: Long option name `--machine`.
fanquake (Migrated from github.com) reviewed 2026-12-03 12:38:37 +00:00
fanquake (Migrated from github.com) commented 2026-12-03 12:38:37 +00:00

Thanks. Added.

Thanks. Added.
fanquake (Migrated from github.com) reviewed 2026-12-03 13:12:30 +00:00
fanquake (Migrated from github.com) commented 2026-12-03 13:12:30 +00:00

Taking a look, but I'm not sure if this will work.

Taking a look, but I'm not sure if this will work.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!37091
No description provided.