Skip to content

Commit fa64228

Browse files
author
MacroFake
committed
fuzz: Avoid timeout in bitdeque fuzz target
1 parent e864f2e commit fa64228

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test/fuzz/bitdeque.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <util/bitdeque.h>
6-
75
#include <random.h>
86
#include <test/fuzz/FuzzedDataProvider.h>
97
#include <test/fuzz/util.h>
8+
#include <util/bitdeque.h>
109

1110
#include <deque>
1211
#include <vector>
@@ -54,7 +53,8 @@ FUZZ_TARGET_INIT(bitdeque, InitRandData)
5453
--initlen;
5554
}
5655

57-
while (provider.remaining_bytes()) {
56+
LIMITED_WHILE(provider.remaining_bytes() > 0, 900)
57+
{
5858
{
5959
assert(deq.size() == bitdeq.size());
6060
auto it = deq.begin();
@@ -538,5 +538,4 @@ FUZZ_TARGET_INIT(bitdeque, InitRandData)
538538
}
539539
);
540540
}
541-
542541
}

0 commit comments

Comments
 (0)