Make fuzzer actually test CTxOutCompressor #9354

pull sipa wants to merge 1 commits into bitcoin:master from sipa:fixfuzz changing 1 files +2 −2
  1. sipa commented at 5:19 pm on December 15, 2016: member
    Fixes a small oversight in #9172.
  2. Make fuzzer actually test CTxOutCompressor 5dd626a6d3
  3. laanwj added the label Tests on Dec 15, 2016
  4. paveljanik commented at 7:41 pm on December 15, 2016: contributor

    Huh, sorry, I do not understand it 8)

    What is the diff supposed to do? If it catches exception, 0 is returned. If it is OK, 0 is returned at the end. So what are we testing at all? Isn’t this optimised out completely anyway?

  5. gmaxwell commented at 8:35 pm on December 15, 2016: contributor

    @paveljanik It catches crashes and asserts and has, in the past, found actual bugs; our deseralizers are already (hopefully!) all used in contexts where the surrounding code is catching their exceptions.

    It isn’t optimized out either because the compiler doesn’t know about side effects of the functions (or their ability to hit asserts!) but it might be prudent to harden a little more against that.

  6. laanwj commented at 9:44 am on December 16, 2016: member

    What is the diff supposed to do? If it catches exception, 0 is returned. If it is OK, 0 is returned at the end. So what are we testing at all?

    It may make sense to return 1 in case of fail and 0 in case of success. That would make it possible for tools to distinguish between successful and failed parses, which is useful to automatically find examples of “accepted” data to compare against another parser.

    Not relevant to this pull, though.

    Isn’t this optimised out completely anyway?

    No, it’s not.

  7. laanwj merged this on Dec 19, 2016
  8. laanwj closed this on Dec 19, 2016

  9. laanwj referenced this in commit b416095371 on Dec 19, 2016
  10. PastaPastaPasta referenced this in commit 32dc5f1da6 on Aug 24, 2019
  11. barrystyle referenced this in commit 95b3203aac on Jan 22, 2020
  12. random-zebra referenced this in commit 44b5327e61 on May 28, 2021
  13. MarcoFalke 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-11-17 21:12 UTC

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