Avoid implicit-integer-sign-change in VerifyLoadedChainstate #24403

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2202-intB changing 4 files +28 −15
  1. MarcoFalke commented at 9:32 am on February 21, 2022: member

    This happens when checking all blocks (-1).

    To test:

    0./configure CC=clang CXX=clang++ --with-sanitizers=undefined,integer
    1make
    2UBSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" ./test/functional/rpc_blockchain.py
    
  2. Avoid implicit-integer-sign-change in VerifyLoadedChainstate fa462ea787
  3. MarcoFalke added the label Refactoring on Feb 21, 2022
  4. Fixup style of VerifyDB fa7991601c
  5. theStack approved
  6. theStack commented at 0:10 am on February 23, 2022: member
    Code-review ACK fa7991601c93761bc12ef33b672a927d48a95569
  7. in src/node/chainstate.cpp:133 in fa7991601c
    128@@ -129,8 +129,8 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
    129                                                                 bool fReset,
    130                                                                 bool fReindexChainState,
    131                                                                 const Consensus::Params& consensus_params,
    132-                                                                unsigned int check_blocks,
    133-                                                                unsigned int check_level,
    134+                                                                int check_blocks,
    135+                                                                int check_level,
    


    benthecarman commented at 6:18 am on February 23, 2022:
    should assert(check_blocks >= 0) and assert(check_level >= 0) be added?

    MarcoFalke commented at 7:22 am on February 23, 2022:
    No, this will crash the test
  8. brunoerg approved
  9. brunoerg commented at 0:16 am on February 24, 2022: member
    crACK fa7991601c93761bc12ef33b672a927d48a95569
  10. MarcoFalke merged this on Feb 28, 2022
  11. MarcoFalke closed this on Feb 28, 2022

  12. MarcoFalke deleted the branch on Feb 28, 2022
  13. sidhujag referenced this in commit 089d5bfbbb on Mar 1, 2022
  14. DrahtBot locked this on Feb 28, 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-10-30 00:12 UTC

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