ci: use DWARF-4 for Valgrind jobs #24735

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:remove_boost_valgrind changing 3 files +4 −12
  1. fanquake commented at 12:14 pm on April 1, 2022: member

    clang-14 defaults to using DWARF-5, which breaks vlagrinds (3.18) ability to parse debug info. Valgrind claims to support DWARF-5 from version 3.18 onwards, but maybe that only works when compiling with GCC.

    Explicitly use DWARF-4 for now. Note that from 11.0 GCC also defaults to using DWARF-5.

    Also remove a Boost related suppression.

  2. fanquake added the label Tests on Apr 1, 2022
  3. MarcoFalke commented at 12:47 pm on April 1, 2022: member
    No objection, but it would be good for either clang or valgrind to fix this, so that we can revert the workaround and that devs are able to use clang-14 out of the box.
  4. fanquake commented at 12:55 pm on April 1, 2022: member
    Looks like there is at least discussion on the Valgrind mailing list [Valgrind-users] does Valgrind-3.19.0.GIT support Clang14 dwarf 5?. I haven’t found anything on the LLVM side yet.
  5. laanwj commented at 4:13 pm on April 1, 2022: member

    I don’t know how big of a change it is, but if it’s anything like going from DWARF 2 to 3 it’s not going to be a trivial change in valgrind. I suspect it’s going to take a while to support it.

    Could add a comment to mention why this override is needed and what would be the condition to remove it.

    Otherwise code review ACK 5691a8f0ec8d0bfc470990dfaed9d230346a116e

  6. in ci/test/00_setup_env_native_fuzz_with_valgrind.sh:19 in 5691a8f0ec outdated
    14@@ -15,5 +15,5 @@ export RUN_FUNCTIONAL_TESTS=false
    15 export RUN_FUZZ_TESTS=true
    16 export FUZZ_TESTS_CONFIG="--valgrind"
    17 export GOAL="install"
    18-export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++"
    19+export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4'"
    


    MarcoFalke commented at 6:29 am on April 4, 2022:

    Could leave CXXFLAGS untouched to minimize the effective changes?

    0# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
    1export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX='clang++ -fdebug-default-version=4'"
    
  7. fanquake force-pushed on Apr 4, 2022
  8. fanquake commented at 8:30 am on April 4, 2022: member

    Could add a comment to mention why this override is needed and what would be the condition to remove it.

    Added.

    Could leave CXXFLAGS untouched to minimize the effective changes?

    Done. Used -gdwarf-4 to minimize even further.

  9. fanquake marked this as a draft on Apr 4, 2022
  10. fanquake force-pushed on Apr 4, 2022
  11. fanquake marked this as ready for review on Apr 4, 2022
  12. fanquake commented at 9:28 am on April 4, 2022: member
    This actually only seems to work when using CXXFLAGS and the full -fdebug-default-version=4, so I’ve reverted back to the original change + the comment.
  13. ci: use DWARF-4 for Valgrind CI job
    clang-14 defaults to using DWARF-5, which breaks vlagrinds (3.18) ability
    to parse debug info. Valgrind claims to support DWARF-5 from version
    3.18 onwards, but maybe that only works when building with GCC.
    
    Explicitly use DWARF-4 for now. Note that from 11.0 GCC also defaults to
    using DWARF-5.
    
    https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#dwarf-support-in-clang
    https://www.gnu.org/software/gcc/gcc-11/changes.html
    https://valgrind.org/docs/manual/dist.news.html
    b0740fdcb8
  14. supp: remove Boost Valgrind suppression 15893a0781
  15. in ci/test/00_setup_env_native_valgrind.sh:17 in 951ddd320a outdated
    12@@ -13,4 +13,5 @@ export USE_VALGRIND=1
    13 export NO_DEPENDS=1
    14 export TEST_RUNNER_EXTRA="--nosandbox --exclude feature_init,rpc_bind,feature_bind_extra"  # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
    15 export GOAL="install"
    16-export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++"  # TODO enable GUI
    17+# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
    18+export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4"  # TODO enable GUI
    


    MarcoFalke commented at 9:52 am on April 4, 2022:
    0export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4'"  # TODO enable GUI
    

    fanquake commented at 9:57 am on April 4, 2022:
    😰
  16. fanquake force-pushed on Apr 4, 2022
  17. MarcoFalke approved
  18. MarcoFalke commented at 10:03 am on April 4, 2022: member
    review ACK
  19. MarcoFalke merged this on Apr 4, 2022
  20. MarcoFalke closed this on Apr 4, 2022

  21. sidhujag referenced this in commit 64f512864b on Apr 4, 2022
  22. DrahtBot locked this on Apr 4, 2023
  23. fanquake deleted the branch on May 26, 2023

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: 2024-11-21 18:12 UTC

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