aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerge-script <fanquake@gmail.com>2024-07-01 12:11:27 +0100
committermerge-script <fanquake@gmail.com>2024-07-01 12:11:27 +0100
commit4c573e57184314c6dace54f7cd04786d1a99c940 (patch)
tree44e569cb0abf7d1f606513156e4cf4919c2c6642
parentc3b446a494dced2e256b7516de6626d22da41f79 (diff)
parente009bf681c0e38a6451afa594ba3c7c8861f61c3 (diff)
Merge bitcoin/bitcoin#30306: fuzz: Improve stability for txorphan and mini_miner harnesses
e009bf681c0e38a6451afa594ba3c7c8861f61c3 Don't use iterator addresses in IteratorComparator (dergoegge) Pull request description: See #29018. Stability for `txorphan` is now >90%. `mini_miner` needs further investigation, stability still low (although slightly improved by this PR) at ~62%. ACKs for top commit: marcofleon: Tested ACK e009bf681c0e38a6451afa594ba3c7c8861f61c3. Using afl++, stability for `txorphan` went from 82% to ~94% and for `mini_miner` it went from 84% to 97%. I ran them both using the corpora in qa-assets. glozow: utACK e009bf681c0e38a6451afa594ba3c7c8861f61c3 Tree-SHA512: 6d0a20fd7ceedca8e702d8adde5fca500d8b0187147aee8d43b4e9eb5176dcacf60180f42a7158f037d18dbb27e479b6c069a0f3c912226505cbff5aa073a415
-rw-r--r--src/node/mini_miner.h2
-rw-r--r--src/txorphanage.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/node/mini_miner.h b/src/node/mini_miner.h
index de62c0af75..aec2aaf6b6 100644
--- a/src/node/mini_miner.h
+++ b/src/node/mini_miner.h
@@ -63,7 +63,7 @@ struct IteratorComparator
template<typename I>
bool operator()(const I& a, const I& b) const
{
- return &(*a) < &(*b);
+ return a->first < b->first;
}
};
diff --git a/src/txorphanage.h b/src/txorphanage.h
index 3054396b2d..3083c8467f 100644
--- a/src/txorphanage.h
+++ b/src/txorphanage.h
@@ -92,7 +92,7 @@ protected:
template<typename I>
bool operator()(const I& a, const I& b) const
{
- return &(*a) < &(*b);
+ return a->first < b->first;
}
};