![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
#include <cstdint>#include <functional>#include <span>#include <string_view>Go to the source code of this file.
Classes | |
| struct | FuzzTargetOptions |
Macros | |
| #define | LIMITED_WHILE(condition, limit) |
| Can be used to limit a theoretically unbounded loop. | |
| #define | FUZZ_TARGET(...) |
| #define | DETAIL_FUZZ(name, ...) |
Typedefs | |
| using | FuzzBufferType = std::span<const uint8_t> |
| using | TypeTestOneInput = std::function<void(FuzzBufferType)> |
Functions | |
| void | FuzzFrameworkRegisterTarget (std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts) |
| #define DETAIL_FUZZ | ( | name, | |
| ... ) |
| #define FUZZ_TARGET | ( | ... | ) |
| #define LIMITED_WHILE | ( | condition, | |
| limit ) |
Can be used to limit a theoretically unbounded loop.
This caps the runtime to avoid timeouts or OOMs.
This can be used in combination with a check in the condition to confirm whether the fuzz engine provided "good" data. If the fuzz input contains invalid data, the loop aborts early. This will teach the fuzz engine to look for useful data and avoids bloating the fuzz input folder with useless data.
| using FuzzBufferType = std::span<const uint8_t> |
| using TypeTestOneInput = std::function<void(FuzzBufferType)> |
| void FuzzFrameworkRegisterTarget | ( | std::string_view | name, |
| TypeTestOneInput | target, | ||
| FuzzTargetOptions | opts ) |