test: Remove tests violating hardened std::span #33886

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2511-test-span-hard changing 1 files +3 −3
  1. maflcko commented at 12:23 pm on November 17, 2025: member

    Also, add a test for creating a CScript from an empty byte vector.

    To test: rm -rf ./bld-cmake && cmake -B ./bld-cmake -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++;-stdlib=libc++;-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG' -DBUILD_GUI=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_BENCH=OFF -DBUILD_KERNEL_LIB=ON -DENABLE_WALLET=OFF -DENABLE_IPC=OFF && cmake --build ./bld-cmake --parallel $( nproc ) && valgrind --tool=none ./bld-cmake/bin/test_kernel --catch_system_error=no

    Before:

    0/cxx_build/include/c++/v1/span:451: libc++ Hardening assertion __count == 0 || std::to_address(__first) != nullptr failed: passed nullptr with non-zero length in span's constructor (iterator, len)
    

    After: (Passes)

  2. test: Remove tests violating hardened std::span fadb4f63cb
  3. DrahtBot added the label Tests on Nov 17, 2025
  4. DrahtBot commented at 12:23 pm on November 17, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33886.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan, stickies-v

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. maflcko force-pushed on Nov 17, 2025
  6. DrahtBot added the label CI failed on Nov 17, 2025
  7. TheCharlatan approved
  8. TheCharlatan commented at 12:33 pm on November 17, 2025: contributor
    ACK fadb4f63cb0f0b544bc95e48cb42c7636c1dec15
  9. fanquake requested review from stickies-v on Nov 17, 2025
  10. DrahtBot removed the label CI failed on Nov 17, 2025
  11. stickies-v approved
  12. stickies-v commented at 1:25 pm on November 17, 2025: contributor

    ACK fadb4f63cb0f0b544bc95e48cb42c7636c1dec15

    It’s unfortunate that we can’t test the nullptr + non-zero length paths through the c++ wrapper, but removing these cases seems like the best approach for now.

  13. fanquake merged this on Nov 17, 2025
  14. fanquake closed this on Nov 17, 2025

  15. maflcko deleted the branch on Nov 17, 2025

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: 2025-12-01 21:13 UTC

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