Run tests in memory sanitizer #17460

issue MarcoFalke opened this issue on November 13, 2019
  1. MarcoFalke commented at 12:58 AM on November 13, 2019: member

    We run the tests in the thread (and other sanitizers), see git grep sanitizer ./ci, but not in the memory sanitizer. This seems like it could be improved. See e.g. #17449

  2. MarcoFalke added the label Feature on Nov 13, 2019
  3. MarcoFalke added the label Tests on Nov 13, 2019
  4. MarcoFalke commented at 3:28 PM on November 14, 2019: member

    On a second thought, it might be better to just run with valgrind: https://github.com/bitcoin-core/secp256k1/pull/687#issuecomment-551794708

  5. practicalswift commented at 3:43 PM on November 14, 2019: contributor

    @MarcoFalke I've tried to add Valgrind to our Travis build before: Valgrind is very good but also very very very slow. Running the unit tests and the functional tests under Valgrind takes hours(!) :(

    Perhaps DynamoRIO's Dr. Memory could be a faster option. I haven't investigated that option yet.

    Another alternative could be to run a subset of the tests under Valgrind and then use MSAN as a complement. With MSAN running all the tests including those excluded from the Valgrind run due to being too slow.

  6. MarcoFalke commented at 3:51 PM on November 14, 2019: member

    Maybe running a single functional test (and/or unit test) in valgrind would be a good start. #17449 would have been caught when Bitcoin Core just boots up on mainnet.

  7. practicalswift commented at 10:44 PM on November 14, 2019: contributor

    Maybe running a single functional test (and/or unit test) in valgrind would be a good start.

    Agreed: to start with something under valgrind would be better nothing :)

    #17449 would have been caught when Bitcoin Core just boots up on mainnet.

    Do you mean "boots up on mainnet" as in when IBD is finished on mainnet?

    FWIW, I've only gotten valgrind to warn about the #17449 case when WarningBitsConditionChecker::Condition(…) is being run. That happens in UpdateTip given that we're done with IBD.

    Perhaps one would expect valgrind to warn earlier in the execution, such as when {CreateChain,Select}Params(…) is run. But that is not the case :)

  8. elichai commented at 2:34 PM on November 25, 2019: contributor
  9. MarcoFalke closed this on Dec 17, 2019

  10. sidhujag referenced this in commit 15711eb917 on Dec 17, 2019
  11. sidhujag referenced this in commit b9e29f9e9c on Nov 10, 2020
  12. MarcoFalke locked this on Dec 16, 2021
  13. knst referenced this in commit a8dea53504 on Apr 18, 2023
  14. knst referenced this in commit ad14b2fe32 on Apr 24, 2023
  15. knst referenced this in commit acd4f8c919 on Apr 24, 2023
  16. knst referenced this in commit f08c059d00 on Apr 25, 2023
  17. knst referenced this in commit 825e472bb4 on May 15, 2023
  18. knst referenced this in commit f56cc24ff9 on May 15, 2023
  19. knst referenced this in commit 42de0fabbf on May 16, 2023
  20. knst referenced this in commit 7adab943e0 on May 16, 2023
  21. knst referenced this in commit 3e8fe9a6d0 on May 18, 2023
  22. knst referenced this in commit 7c05909fb9 on May 25, 2023
  23. knst referenced this in commit f2ba7cbeda on May 30, 2023
  24. knst referenced this in commit ba08dd7439 on Jun 1, 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: 2026-04-17 06:14 UTC

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