build: Run functional tests and benchmarks under the undefined behaviour sanitizer (UBSan) #14252

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:ubsan changing 3 files +31 −12
  1. practicalswift commented at 8:51 am on September 18, 2018: contributor

    Run functional tests and benchmarks under the undefined behaviour sanitizer (UBSan).

    This will make Travis automatically detect issues such as:

    • #14242: Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...)
    • #14239: Avoid dividing by zero (undefined behaviour) in EstimateMedianVal (policy)/ConnectTip (validation)/CreateTransaction (wallet)
    • #13546: wallet: Avoid potential use of uninitialized value bnb_used in CWallet::CreateTransaction(...)

    Addresses issue #14059.

  2. practicalswift force-pushed on Sep 18, 2018
  3. DrahtBot commented at 10:04 am on September 18, 2018: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #14528 (travis: Compile once on xenial by MarcoFalke)
    • #14489 (refactor: Drop boost::thread and boost::chrono by ken2812221)
    • #14092 (tests: Dry run bench_bitcoin as part “make check” to allow for quick identification of assertion/sanitizer failures in benchmarking code by practicalswift)
    • #12134 (Build previous releases and run functional tests by Sjors)

    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.

  4. fanquake added the label Tests on Sep 18, 2018
  5. in .travis.yml:114 in e931169591 outdated
    105-        HOST=x86_64-unknown-linux-gnu
    106-        PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
    107-        NO_DEPENDS=1
    108-        GOAL="install"
    109-        BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
    110-# x86_64 Linux (sanitizers)
    


    ken2812221 commented at 1:22 am on September 19, 2018:
    Why do you remove this job?

    practicalswift commented at 7:18 am on September 19, 2018:

    It is not removed - the two jobs are merged in accordance to this comment:

    0Disabled for now, can be combined with the other x86_64 linux NO_DEPENDS job
    1when functional tests pass the sanitizers
    

    Let me know if you see any technical reasons for not doing that job merge :-)

  6. practicalswift commented at 9:36 pm on September 27, 2018: contributor
    @MarcoFalke Would you mind reviewing? :-) This would help solve the issue #14059 which you posted :-)
  7. DrahtBot commented at 7:36 am on September 28, 2018: member
    Coverage Change (pull 14252) Reference (master)
    Lines +0.0022 % 87.0361 %
    Functions +0.0463 % 84.1130 %
    Branches -0.0076 % 51.5451 %
  8. DrahtBot added the label Needs rebase on Nov 2, 2018
  9. practicalswift force-pushed on Nov 5, 2018
  10. practicalswift commented at 12:53 pm on November 5, 2018: contributor
    Rebased!
  11. DrahtBot removed the label Needs rebase on Nov 5, 2018
  12. DrahtBot added the label Needs rebase on Nov 5, 2018
  13. practicalswift force-pushed on Nov 5, 2018
  14. practicalswift force-pushed on Nov 5, 2018
  15. in .travis.yml:120 in 9528a910fc outdated
    117       env: >-
    118         HOST=x86_64-unknown-linux-gnu
    119         PACKAGES="clang python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
    120         NO_DEPENDS=1
    121-        RUN_FUNCTIONAL_TESTS=false # Disabled for now, can be combined with the other x86_64 linux NO_DEPENDS job when functional tests pass the sanitizers
    122+        RUN_BENCH=true
    


    MarcoFalke commented at 4:22 pm on November 5, 2018:

    why?

    Also could be combined with the above job?


    practicalswift commented at 4:29 pm on November 5, 2018:
    Incorrect merge resolved. Please re-review :-)
  16. practicalswift force-pushed on Nov 5, 2018
  17. DrahtBot removed the label Needs rebase on Nov 5, 2018
  18. Enable functional tests in UBSAN job. Enable -fsanitize=integer (part of UBSAN). Merge UBSAN Travis job with no depends. 9f49db7335
  19. in .travis.yml:112 in 78cb1cd7d7 outdated
    117       env: >-
    118         HOST=x86_64-unknown-linux-gnu
    119         PACKAGES="clang python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
    120         NO_DEPENDS=1
    121-        RUN_FUNCTIONAL_TESTS=false # Disabled for now, can be combined with the other x86_64 linux NO_DEPENDS job when functional tests pass the sanitizers
    122+        RUN_FUNCTIONAL_TESTS=true
    


    MarcoFalke commented at 4:43 pm on November 5, 2018:
    The default is already true. Could remove this line?

    practicalswift commented at 7:10 pm on November 5, 2018:
    Done! Please re-review :-)
  20. practicalswift force-pushed on Nov 5, 2018
  21. MarcoFalke commented at 7:32 pm on November 5, 2018: member
    utACK 9f49db7335cbcd9d3c726d965604ff3316bc38e5
  22. MarcoFalke merged this on Nov 5, 2018
  23. MarcoFalke closed this on Nov 5, 2018

  24. MarcoFalke referenced this in commit 1ba5583646 on Nov 5, 2018
  25. MarcoFalke referenced this in commit d864e45730 on Nov 6, 2018
  26. MarcoFalke referenced this in commit 7027c67cac on Jul 2, 2020
  27. practicalswift deleted the branch on Apr 10, 2021
  28. PastaPastaPasta referenced this in commit 1197a1f392 on Aug 16, 2021
  29. PastaPastaPasta referenced this in commit 3159471f89 on Aug 16, 2021
  30. PastaPastaPasta referenced this in commit 857fae9277 on Aug 16, 2021
  31. PastaPastaPasta referenced this in commit 847192d1f5 on Aug 16, 2021
  32. PastaPastaPasta referenced this in commit 009f0059b9 on Aug 17, 2021
  33. PastaPastaPasta referenced this in commit ad29f7f495 on Aug 17, 2021
  34. PastaPastaPasta referenced this in commit b98e643250 on Aug 18, 2021
  35. PastaPastaPasta referenced this in commit 0643014cb2 on Aug 18, 2021
  36. vijaydasmp referenced this in commit dfa262c93f on Oct 4, 2021
  37. gades referenced this in commit 7c4d74079c on Apr 20, 2022
  38. gades referenced this in commit d4d6aafea7 on Apr 20, 2022
  39. DrahtBot locked this on Aug 16, 2022

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-17 12:12 UTC

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