Skip to content

Commit 4c573e5

Browse files
committed
Merge bitcoin/bitcoin#30306: fuzz: Improve stability for txorphan and mini_miner harnesses
e009bf6 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 e009bf6. 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 e009bf6 Tree-SHA512: 6d0a20fd7ceedca8e702d8adde5fca500d8b0187147aee8d43b4e9eb5176dcacf60180f42a7158f037d18dbb27e479b6c069a0f3c912226505cbff5aa073a415
2 parents c3b446a + e009bf6 commit 4c573e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/node/mini_miner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct IteratorComparator
6363
template<typename I>
6464
bool operator()(const I& a, const I& b) const
6565
{
66-
return &(*a) < &(*b);
66+
return a->first < b->first;
6767
}
6868
};
6969

src/txorphanage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class TxOrphanage {
9292
template<typename I>
9393
bool operator()(const I& a, const I& b) const
9494
{
95-
return &(*a) < &(*b);
95+
return a->first < b->first;
9696
}
9797
};
9898

0 commit comments

Comments
 (0)