ci: build libFuzzer from source for MSan task #37091

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:msan_ci_build_libfuzzer changing 2 files +29 −1
  1. fanquake commented at 11:18 AM on December 3, 2026: member

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

  2. DrahtBot added the label Tests on Dec 3, 2026
  3. DrahtBot commented at 11:18 AM on December 3, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy 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 <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-->

  4. in ci/test/01_base_install.sh:94 in b6d2e092a4 outdated
      87 | @@ -88,6 +88,34 @@ if [[ -n "${USE_INSTRUMENTED_LIBCPP}" ]]; then
      88 |  
      89 |    ninja -C /cxx_build/ "$MAKEJOBS"
      90 |  
      91 | +# The libFuzzer from apt.llvm.org is built against libstdc++, so can't be
      92 | +# linked against the libc++ built above.
      93 | +  cmake -G Ninja -B /fuzzer_build/ \
      94 | +    -DLLVM_ENABLE_RUNTIMES="compiler-rt" \
    


    maflcko commented at 11:40 AM on December 3, 2026:

    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.


    fanquake commented at 1:12 PM on December 3, 2026:

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

  5. in ci/test/01_base_install.sh:115 in b6d2e092a4
     110 | +    -DCOMPILER_RT_BUILD_XRAY=OFF \
     111 | +    -S /llvm-project/runtimes
     112 | +
     113 | +  ninja -C /fuzzer_build/ "$MAKEJOBS" fuzzer
     114 | +
     115 | +  LIBFUZZER="libclang_rt.fuzzer-$(uname -m).a"
    


    maflcko commented at 11:40 AM on December 3, 2026:

    nit: Long option name --machine.


    fanquake commented at 12:38 PM on December 3, 2026:

    Thanks. Added.

  6. maflcko commented at 11:41 AM on December 3, 2026: member

    thx, lgtm

  7. fanquake marked this as ready for review on Dec 3, 2026
  8. ci: build libFuzzer from source for MSan task
    The libFuzzer shipped by apt.llvm.org is built against libstdc++, rather
    libc++, so fails to link against the instrumented libc++.
    82539e7f86
  9. Revert "ci: Drop libFuzzer from msan fuzz task"
    This reverts commit fa70e23de75baaf8c1ef6836ffe8ca73562c8937.
    2f97d87cdb
  10. fanquake force-pushed on Dec 3, 2026
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-12-04 12:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me