Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::fuzzing Namespace Reference

Functions

MemoryValue read_mem_value (FuzzedDataProvider &fdp)
 Read a MemoryValue from the fuzzed data provider.
 

Function Documentation

◆ read_mem_value()

bb::avm2::MemoryValue bb::avm2::fuzzing::read_mem_value ( FuzzedDataProvider &  fdp)

Read a MemoryValue from the fuzzed data provider.

This function consumes 32 bytes from the fuzzer to create a uint256_t value, then selects a random MemoryTag and creates a MemoryValue with that tag, truncating the value to fit the tag if necessary.

Parameters
fdpThe FuzzedDataProvider to consume data from
Returns
MemoryValue A memory value with a random tag and fuzzed value

Definition at line 16 of file mutation_helper.cpp.