Crash debug builds on PCKG_MEMPOOL_ERROR #25009

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2204-crash-debug-🏦 changing 1 files +3 −0
  1. MarcoFalke commented at 4:30 pm on April 27, 2022: member
    Would be nice to allow fuzz targets to meaningfully cover this code
  2. Crash debug builds on PCKG_MEMPOOL_ERROR fa10c9f5a1
  3. DrahtBot added the label Validation on Apr 27, 2022
  4. fanquake requested review from glozow on Apr 27, 2022
  5. glozow commented at 11:17 pm on April 27, 2022: member

    utACK fa10c9f5a1c9f8b37d51f43f98254feb9a8f9c53

    These codepaths should never be hit (policy script checks pass but consensus script checks fail, ancestor/descendant limits fail on submission, or Finalize() somehow fails in SubmitPackage()). Crashing debug builds will let us know if the fuzzer finds something.

  6. vincenzopalazzo approved
  7. MarcoFalke merged this on Apr 29, 2022
  8. MarcoFalke closed this on Apr 29, 2022

  9. in src/validation.cpp:1119 in fa10c9f5a1
    1115@@ -1116,6 +1116,7 @@ bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector<Workspace>&
    1116         if (!ConsensusScriptChecks(args, ws)) {
    1117             results.emplace(ws.m_ptx->GetWitnessHash(), MempoolAcceptResult::Failure(ws.m_state));
    1118             // Since PolicyScriptChecks() passed, this should never fail.
    1119+            Assume(false);
    


    ajtowns commented at 6:25 am on April 29, 2022:
    Is there a reason why you didn’t write this as if (!Assume(ConsensusScriptChecks(args, ws))) ?

    MarcoFalke commented at 6:28 am on April 29, 2022:
    no reason. Can be changed the next time the code is touched.
  10. MarcoFalke deleted the branch on Apr 29, 2022
  11. sidhujag referenced this in commit f3be8890c7 on Apr 29, 2022
  12. DrahtBot locked this on Apr 29, 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-12-21 15:12 UTC

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