fuzz: Add CScriptNum::getint coverage #18510

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2004-fuzzScriptNumGetInt changing 2 files +13 −0
  1. fuzz: Add CScriptNum::getint coverage faa64af960
  2. fanquake added the label Tests on Apr 3, 2020
  3. DrahtBot commented at 7:47 PM on April 3, 2020: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18413 (script: prevent UB when computing abs value for num opcode serialize by pierreN)

    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. in src/test/fuzz/integer.cpp:140 in faa64af960
     135 |  
     136 | +    const CScriptNum script_num{i64};
     137 | +    (void)script_num.getint();
     138 | +    // Avoid negation failure:
     139 | +    // script/script.h:332:35: runtime error: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itself
     140 | +    if (script_num != CScriptNum{std::numeric_limits<int64_t>::min()}) {
    


    pierreN commented at 8:34 PM on April 3, 2020:

    I just saw the conflict with this PR and mine.

    If #18413 is merged, is this line useful ?

    We can merge this (#18510) first and I'll update my branch accordingly (or the opposite too if you prefer).

  5. practicalswift commented at 2:14 PM on April 4, 2020: contributor

    ACK faa64af960b64b522bb088e836c9d8cd6254c6c8 -- more fuzzing coverage is better than less fuzzing coverage :)

  6. MarcoFalke merged this on Apr 4, 2020
  7. MarcoFalke closed this on Apr 4, 2020

  8. MarcoFalke deleted the branch on Apr 4, 2020
  9. sidhujag referenced this in commit e3c78cc206 on Apr 8, 2020
  10. Fabcien referenced this in commit e184da672e on Jan 20, 2021
  11. DrahtBot locked this on Feb 15, 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: 2026-04-17 06:14 UTC

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