Skip to content

ci: build libFuzzer from source for MSan task - #37091

Open
fanquake wants to merge 2 commits into
bitcoin:masterfrom
fanquake:msan_ci_build_libfuzzer
Open

fanquake wants to merge 2 commits into
bitcoin:masterfrom
fanquake:msan_ci_build_libfuzzer

Conversation

@fanquake

@fanquake fanquake commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

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

@DrahtBot DrahtBot added the Tests label Dec 3, 2026
@DrahtBot

DrahtBot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

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.

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx, lgtm

# The libFuzzer from apt.llvm.org is built against libstdc++, so can't be
# linked against the libc++ built above.
cmake -G Ninja -B /fuzzer_build/ \
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread ci/test/01_base_install.sh Resolved
@fanquake
fanquake marked this pull request as ready for review December 3, 2026 13:04
The libFuzzer shipped by apt.llvm.org is built against libstdc++, rather
libc++, so fails to link against the instrumented libc++.
@fanquake
fanquake force-pushed the msan_ci_build_libfuzzer branch from b6d2e09 to 2f97d87 Compare December 3, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants