Make tinyformat errors raise an exception instead of assert()ing #3767

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2014_02_tinyformat_errors_non_fatal changing 1 files +1 −1
  1. laanwj commented at 8:28 am on February 28, 2014: member

    By default tinyformat errors such as ‘wrong number of conversion specifiers in format string’ cause an assertion failure.

    Raise an exception instead so that error handling can recover or can show an appropriate error.

  2. Make tinyformat errors raise an exception instead of assert()ing
    By default tinyformat errors such as 'wrong number of conversion
    specifiers in format string' cause an assertion failure.
    
    Raise an exception instead so that error handling can recover or can
    show an appropriate error.
    1b8fd35aad
  3. BitcoinPullTester commented at 8:52 am on February 28, 2014: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/1b8fd35aadfad6a1e55391f02add6076c8c9ea8f for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  4. sipa commented at 1:03 pm on February 28, 2014: member
    Do we really want to continue in case of a code typo?
  5. laanwj commented at 1:11 pm on February 28, 2014: member

    It’s a matter of robustness. Let’s think about the following (completely imaginary) scenario:

    Some rarely-hit debug logging code in the network code is using the wrong formatting. An attacker that can manage to hit this can bring down the entire node.

    If we just raise a runtime exception, all it does is log and exception and kill the current connection. A nuisance instead of a DoS.

  6. gavinandresen commented at 1:22 pm on February 28, 2014: contributor
    ACK from me, much better to have errors in debug.log than assertion failures.
  7. gavinandresen referenced this in commit 829f822267 on Feb 28, 2014
  8. gavinandresen merged this on Feb 28, 2014
  9. gavinandresen closed this on Feb 28, 2014

  10. laanwj deleted the branch on Apr 9, 2014
  11. laanwj referenced this in commit a2a3f4ba2c on Jun 27, 2016
  12. laanwj referenced this in commit 1666e37fb7 on Jun 27, 2016
  13. laanwj referenced this in commit 695041e495 on Jun 27, 2016
  14. zkbot referenced this in commit 6bad499c2a on Oct 25, 2016
  15. protonn referenced this in commit 2e09c3d7f1 on May 7, 2017
  16. lateminer referenced this in commit 0320890116 on Jan 3, 2019
  17. DrahtBot locked this on Sep 8, 2021

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-09-29 01:12 UTC

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