fuzz: Run const CScript member functions only once #21927

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2105-fuzzCscript changing 1 files +30 −31
  1. MarcoFalke commented at 8:25 AM on May 12, 2021: member

    Those functions should be O(N) in the input size (or maybe worse, I didn't check), so if the fuzz input dictates to run them N times, the complexity is N^2.

    Fix this by calling them only once.

    Can be reviewed with: --ignore-all-space --word-diff-regex=.

    Input: https://github.com/bitcoin/bitcoin/files/6464685/clusterfuzz-testcase-minimized-input.log

    Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34101

  2. fuzz: Run const CScript member functions only once fa74bfc860
  3. practicalswift commented at 9:46 AM on May 12, 2021: contributor

    cr ACK fa74bfc8601cd2b749deb38388e2a4636d8b86ea: patch looks correct, rationale makes sense and patch touches only src/test/fuzz/

  4. DrahtBot added the label Tests on May 12, 2021
  5. MarcoFalke merged this on May 12, 2021
  6. MarcoFalke closed this on May 12, 2021

  7. MarcoFalke deleted the branch on May 12, 2021
  8. sidhujag referenced this in commit 5634271c2f on May 12, 2021
  9. gwillen referenced this in commit d8f9c34946 on Jun 1, 2022
  10. DrahtBot locked this on Aug 18, 2022
Labels

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