Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
external_call.fuzzer.cpp File Reference

Go to the source code of this file.

Classes

struct  ExternalCallFuzzerInstance
 
struct  ExternalCallFuzzerInput
 

Typedefs

using external_call_rel = bb::avm2::external_call< FF >
 

Functions

void mutate_call_instance (ExternalCallFuzzerInput &input, std::mt19937 rng)
 
size_t LLVMFuzzerCustomMutator (uint8_t *data, size_t size, size_t max_size, unsigned int seed)
 
ContextEvent fill_context_event (std::unique_ptr< ContextInterface > &context)
 
std::unique_ptr< ContextInterfacefuzz_call (std::vector< ExecutionEvent > &ex_events, GadgetFuzzerContextHelper &helper, std::unique_ptr< ContextInterface > &parent_context, ExecutionComponentsProvider &execution_components, ExternalCallFuzzerInstance input)
 
void fuzz_return (std::vector< ExecutionEvent > &ex_events, std::unique_ptr< ContextInterface > &context, ExecutionComponentsProvider &execution_components)
 
int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 

Variables

const uint8_t max_flat_calls = 3
 
const uint8_t max_nested_calls = 2
 
const uint8_t max_total_calls = max_flat_calls * max_nested_calls
 
const uint32_t min_l2_gas = AVM_CALL_BASE_L2_GAS + AVM_RETURN_BASE_L2_GAS
 
const auto dummy_instr
 

Typedef Documentation

◆ external_call_rel

Function Documentation

◆ fill_context_event()

ContextEvent fill_context_event ( std::unique_ptr< ContextInterface > &  context)

Definition at line 256 of file external_call.fuzzer.cpp.

◆ fuzz_call()

std::unique_ptr< ContextInterface > fuzz_call ( std::vector< ExecutionEvent > &  ex_events,
GadgetFuzzerContextHelper helper,
std::unique_ptr< ContextInterface > &  parent_context,
ExecutionComponentsProvider execution_components,
ExternalCallFuzzerInstance  input 
)

Definition at line 267 of file external_call.fuzzer.cpp.

◆ fuzz_return()

void fuzz_return ( std::vector< ExecutionEvent > &  ex_events,
std::unique_ptr< ContextInterface > &  context,
ExecutionComponentsProvider execution_components 
)

Definition at line 326 of file external_call.fuzzer.cpp.

◆ LLVMFuzzerCustomMutator()

size_t LLVMFuzzerCustomMutator ( uint8_t *  data,
size_t  size,
size_t  max_size,
unsigned int  seed 
)

Definition at line 193 of file external_call.fuzzer.cpp.

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t *  data,
size_t  size 
)

Definition at line 364 of file external_call.fuzzer.cpp.

◆ mutate_call_instance()

void mutate_call_instance ( ExternalCallFuzzerInput input,
std::mt19937  rng 
)

Definition at line 154 of file external_call.fuzzer.cpp.

Variable Documentation

◆ dummy_instr

const auto dummy_instr
Initial value:
.operand<uint8_t>(0)
.operand<uint8_t>(0)
.operand<uint8_t>(0)
.build()
InstructionBuilder & operand(OperandBuilder operand)

Definition at line 45 of file external_call.fuzzer.cpp.

◆ max_flat_calls

const uint8_t max_flat_calls = 3

Definition at line 38 of file external_call.fuzzer.cpp.

◆ max_nested_calls

const uint8_t max_nested_calls = 2

Definition at line 39 of file external_call.fuzzer.cpp.

◆ max_total_calls

const uint8_t max_total_calls = max_flat_calls * max_nested_calls

Definition at line 40 of file external_call.fuzzer.cpp.

◆ min_l2_gas

const uint32_t min_l2_gas = AVM_CALL_BASE_L2_GAS + AVM_RETURN_BASE_L2_GAS

Definition at line 42 of file external_call.fuzzer.cpp.