This is the first step toward improving fuzz stability and determinism (https://github.com/bitcoin/bitcoin/issues/29018).
A fuzz target using the global test-only PRNG will now abort if the seed is re-used across fuzz inputs.
Also, temporarily add SeedRandomStateForTest(SeedRand::ZEROS)
to all affected fuzz targets. This may slow down the libfuzzer leak detector, but it will disable itself after some time, or it can be disabled explicitly with -detect_leaks=0
.
In a follow-up, each affected fuzz target can be stripped of the global random use and a local RandomMixin
(or similar) can be added instead.
(Can be tested by removing any one of the re-seed calls and observing a fuzz abort)