|
curl-fuzzer C++ reference
|
Bind all LPM operations for one process to one protobuf message type. More...
#include <profile_fuzzer.h>
Static Public Member Functions | |
| static void | EnsurePostProcessor () |
| Register the profile postprocessor before the first LPM operation. | |
| static void | NormalizeMessage (Message *message) |
| Remove unknown wire data, normalize through the common runtime model, and lift back into the same generated profile type. | |
| static std::size_t | CustomMutator (std::uint8_t *data, std::size_t size, std::size_t max_size, unsigned int seed) |
| Mutate a binary profile message and retain its exact type in LPM's cache. | |
| static std::size_t | CustomCrossOver (const std::uint8_t *data1, std::size_t size1, const std::uint8_t *data2, std::size_t size2, std::uint8_t *out, std::size_t max_out_size, unsigned int seed) |
| Cross two binary profile messages using the same type as mutation/load. | |
| static bool | LoadAndLower (const std::uint8_t *data, std::size_t size, RuntimeScenario *runtime) |
| Load one binary profile message and transfer it into owned runtime state. | |
Bind all LPM operations for one process to one protobuf message type.
Traits must provide:
Lower and Lift transfer fields directly. They must not serialize, reparse, reflection-swap unlike message types, or retain pointers into the source. Keeping the same Message in mutation, crossover, and loading is required by LPM's process-wide last-mutation cache.
Definition at line 69 of file profile_fuzzer.h.
|
inlinestatic |
Cross two binary profile messages using the same type as mutation/load.
| data1 | Serialized first parent message. |
| size1 | Number of bytes in data1. |
| data2 | Serialized second parent message. |
| size2 | Number of bytes in data2. |
| out | Destination buffer for the crossed message. |
| max_out_size | Capacity of out. |
| seed | Deterministic crossover seed supplied by libFuzzer. |
Definition at line 122 of file profile_fuzzer.h.
|
inlinestatic |
Mutate a binary profile message and retain its exact type in LPM's cache.
| data | Serialized profile message buffer to mutate in place. |
| size | Number of input bytes currently stored in data. |
| max_size | Capacity of data available for the mutated message. |
| seed | Deterministic mutation seed supplied by libFuzzer. |
Definition at line 107 of file profile_fuzzer.h.
|
inlinestatic |
Load one binary profile message and transfer it into owned runtime state.
This deliberately uses LPM's ordinary input unchanged. On a cache hit, the cached Message is the same concrete type used above; on a parse path, LPM invokes the registered postprocessor before this direct lowering.
| data | Serialized profile message bytes. |
| size | Number of bytes available at data. |
| runtime | Destination for the owned, lowered runtime Scenario. |
Definition at line 141 of file profile_fuzzer.h.
|
inlinestatic |
Remove unknown wire data, normalize through the common runtime model, and lift back into the same generated profile type.
| message | Generated profile message to normalize in place. |
Definition at line 86 of file profile_fuzzer.h.