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

Go to the source code of this file.

Classes

struct  InternalCallFuzzerInput
 

Typedefs

using internal_call_rel = bb::avm2::internal_call< FF >
 

Functions

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, InternalCallStackManagerInterface &internal_call_stack_manager)
 
void fuzz_internal_call (std::vector< ExecutionEvent > &ex_events, std::unique_ptr< ContextInterface > &context, InternalCallStackManagerInterface &internal_call_stack_manager, uint32_t loc)
 
void fuzz_internal_return (std::vector< ExecutionEvent > &ex_events, std::unique_ptr< ContextInterface > &context, InternalCallStackManagerInterface &internal_call_stack_manager)
 
int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 

Variables

const uint8_t max_flat_calls = 5
 
const uint8_t max_nested_calls = 5
 
const uint8_t max_total_calls = max_flat_calls * max_nested_calls
 
const auto call_instr
 
const auto ret_instr = bb::avm2::testing::InstructionBuilder(WireOpCode::INTERNALRETURN).build()
 
const auto dummy_instr
 

Typedef Documentation

◆ internal_call_rel

Function Documentation

◆ fill_context_event()

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

Definition at line 179 of file internal_call.fuzzer.cpp.

◆ fuzz_internal_call()

void fuzz_internal_call ( std::vector< ExecutionEvent > &  ex_events,
std::unique_ptr< ContextInterface > &  context,
InternalCallStackManagerInterface internal_call_stack_manager,
uint32_t  loc 
)

Definition at line 191 of file internal_call.fuzzer.cpp.

◆ fuzz_internal_return()

void fuzz_internal_return ( std::vector< ExecutionEvent > &  ex_events,
std::unique_ptr< ContextInterface > &  context,
InternalCallStackManagerInterface internal_call_stack_manager 
)

Definition at line 213 of file internal_call.fuzzer.cpp.

◆ LLVMFuzzerCustomMutator()

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

Definition at line 113 of file internal_call.fuzzer.cpp.

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t *  data,
size_t  size 
)

Definition at line 247 of file internal_call.fuzzer.cpp.

Variable Documentation

◆ call_instr

const auto call_instr
Initial value:
=
bb::avm2::testing::InstructionBuilder(WireOpCode::INTERNALCALL)
.operand<uint32_t>(10)
.build()
InstructionBuilder & operand(OperandBuilder operand)

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

◆ dummy_instr

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

Definition at line 50 of file internal_call.fuzzer.cpp.

◆ max_flat_calls

const uint8_t max_flat_calls = 5

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

◆ max_nested_calls

const uint8_t max_nested_calls = 5

Definition at line 41 of file internal_call.fuzzer.cpp.

◆ max_total_calls

const uint8_t max_total_calls = max_flat_calls * max_nested_calls

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

◆ ret_instr

const auto ret_instr = bb::avm2::testing::InstructionBuilder(WireOpCode::INTERNALRETURN).build()

Definition at line 49 of file internal_call.fuzzer.cpp.