test: LLVM/Clang 16 for MSAN jobs #27436

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:msan_llvm_16 changing 4 files +11 −12
  1. fanquake commented at 3:27 PM on April 7, 2023: member

    Similar to other CI infra changes we've made recently. Move to LLVM/Clang 16 for the MSAN jobs (which is currently using LLVM 12).

    See also: https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#sanitizers:

    -fsanitize-memory-param-retval is turned on by default. With -fsanitize=memory, passing uninitialized variables to functions and returning uninitialized variables from functions is more aggressively reported. -fno-sanitize-memory-param-retval restores the previous behavior.

  2. DrahtBot commented at 3:27 PM on April 7, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK dergoegge

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #27340 (ci: Use Cirrus CI dockerfile env by MarcoFalke)

    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.

  3. DrahtBot added the label Tests on Apr 7, 2023
  4. in ci/test/01_base_install.sh:53 in dd542d6459 outdated
      54 | -  git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-12.0.0 "${BASE_SCRATCH_DIR}"/msan/llvm-project
      55 | -  cd "${BASE_SCRATCH_DIR}"/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/
      56 | -  cd "${BASE_SCRATCH_DIR}"/msan/build/ && make "$MAKEJOBS" cxx
      57 | +  update-alternatives --install /usr/bin/clang++ clang++ "$(which clang++-16)" 100
      58 | +  update-alternatives --install /usr/bin/clang clang "$(which clang-16)" 100
      59 | +  git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-16.0.0 "${BASE_SCRATCH_DIR}"/msan/llvm-project
    


    fanquake commented at 3:34 PM on April 7, 2023:

    fanquake commented at 3:47 PM on April 7, 2023:

    Moved to 16.0.1.

  5. in ci/test/00_setup_env_native_msan.sh:20 in dd542d6459 outdated
      19 |  # BDB generates false-positives and will be removed in future
      20 | -export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
      21 | +export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang-16' CXX='clang++-16' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
      22 |  export GOAL="install"
      23 | -export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
      24 | +export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no CC=clang-16 CXX=clang++-16 CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
    


    maflcko commented at 3:42 PM on April 7, 2023:

    any reason to change this here and elsewhere? Either you use update-alternatives, or hardcode the version, but doing both seems not needed?


    fanquake commented at 3:47 PM on April 7, 2023:

    Right, no need to change these with update-alternatives. Dropped.

  6. maflcko approved
  7. maflcko commented at 3:42 PM on April 7, 2023: member

    lgtm

  8. fanquake force-pushed on Apr 7, 2023
  9. test: LLVM/Clang 16 for MSAN jobs
    Sync up with other CI infra.
    676671527f
  10. in ci/test/01_base_install.sh:54 in c0aa5f7105 outdated
      55 | -  cd "${BASE_SCRATCH_DIR}"/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/
      56 | -  cd "${BASE_SCRATCH_DIR}"/msan/build/ && make "$MAKEJOBS" cxx
      57 | +  update-alternatives --install /usr/bin/clang++ clang++ "$(which clang++-16)" 100
      58 | +  update-alternatives --install /usr/bin/clang clang "$(which clang-16)" 100
      59 | +  git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-16.0.1 "${BASE_SCRATCH_DIR}"/msan/llvm-project
      60 | +  cmake -B "${BASE_SCRATCH_DIR}"/msan/build/ -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang-16 -DCMAKE_CXX_COMPILER=clang++-16 -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -S "${BASE_SCRATCH_DIR}"/msan/llvm-project/runtimes
    


    maflcko commented at 9:44 AM on April 10, 2023:
      cmake -B "${BASE_SCRATCH_DIR}"/msan/build/ -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -S "${BASE_SCRATCH_DIR}"/msan/llvm-project/runtimes
    

    nit?


    fanquake commented at 9:57 AM on April 10, 2023:

    Yea. Fixed

  11. fanquake force-pushed on Apr 10, 2023
  12. dergoegge commented at 9:42 AM on April 11, 2023: member

    utACK 676671527f08ef8113af3661de73db583f6ea9e2

  13. fanquake merged this on Apr 11, 2023
  14. fanquake closed this on Apr 11, 2023

  15. fanquake deleted the branch on Apr 11, 2023
  16. sidhujag referenced this in commit eaa6da3dc7 on Apr 11, 2023
  17. maflcko commented at 6:52 AM on April 13, 2023: member

    ci_native_fuzz_msan fails for me locally

  18. bitcoin locked this on Apr 12, 2024

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-04-20 00:13 UTC

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