MCPcopy Create free account

hub / github.com/FuzzingLabs/cairo-fuzzer / functions

Functions157 in github.com/FuzzingLabs/cairo-fuzzer

↓ 31 callersMethodrand
(&mut self, min: usize, max: usize)
src/mutator/mutator_felt252.rs:86
↓ 26 callersMethodgen_range
Generate a random number in the range [start, end]
cairo-native-fuzzer/src/custom_rand/rng.rs:36
↓ 26 callersMethodinsert
Insert `buf` at `offset` in the input. `buf` will be truncated to ensure the input stays within the maximum input size
src/mutator/mutator_felt252.rs:659
↓ 15 callersMethodrand_exp
(&mut self, min: usize, max: usize)
src/mutator/mutator_felt252.rs:108
↓ 14 callersMethodrand_offset
Generate a random offset, see `rand_offset_int` for more info
src/mutator/mutator_felt252.rs:418
↓ 8 callersMethodrand_offset_int
Pick a random offset in the input to corrupt. Any mutation strategy which needs to pick a random byte should us this, such that a bias can be applied
src/mutator/mutator_felt252.rs:398
↓ 6 callersMethoddump_json
Function to dump the crashes corpus
src/fuzzer/corpus_crash.rs:180
↓ 5 callersMethodfuzz
Fuzz
src/fuzzer/fuzzer.rs:183
↓ 4 callersMethodnext
(&mut self)
src/mutator/mutator_felt252.rs:75
↓ 4 callersMethodrun
(mut self, data: &Vec<Felt252>)
src/runner/starknet_runner.rs:103
↓ 3 callersFunctionget_abi
(data: &Value)
src/json/json_parser.rs:96
↓ 3 callersFunctionget_function_from_json
(data: &String, function_name: &String)
src/json/json_parser.rs:105
↓ 3 callersMethodoverwrite
Overwrite the bytes in the input with `buf` at `offset`. If `buf` goes out of bounds of the input the `buf` will be truncated and the copy will stop.
src/mutator/mutator_felt252.rs:672
↓ 3 callersMethodrand_usize
Get a random usize number using xorshift
cairo-native-fuzzer/src/custom_rand/rng.rs:31
↓ 3 callersMethodreplay
Replay a given corpus. If `minimizer` is set to "true" it will dump the new corpus
src/fuzzer/fuzzer.rs:218
↓ 2 callersFunctionextract_function_name
Extracts the function name from the prototype string
test-generator/src/main.rs:46
↓ 2 callersFunctionfind_entry_point_id
Find the entry point id
cairo-native-fuzzer/src/fuzzer/utils.rs:132
↓ 2 callersMethodfuzz
Runs the fuzzer.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:321
↓ 2 callersMethodget_state
(self)
src/runner/starknet_runner.rs:92
↓ 2 callersFunctionhash_vector
(vector: &[T])
src/fuzzer/utils.rs:4
↓ 2 callersMethodinitialize_parameters
Initializes parameters based on the function argument types.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:223
↓ 2 callersMethodmonitor
Function to print stats of the running fuzzer
src/fuzzer/fuzzer.rs:303
↓ 2 callersFunctionrun_program
Execute a program with arbitraty entrypoint & parameters
cairo-native-fuzzer/src/runner/runner.rs:28
↓ 2 callersMethodset
Randomly replace a sequence of bytes with the same random character repeated a random amount of times
src/mutator/mutator_felt252.rs:563
↓ 2 callersMethodsetup_execution_environment
Sets up the execution environment by compiling the Sierra program and creating a JIT executor.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:230
↓ 1 callersMethodadd_small_random_value
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:48
↓ 1 callersMethodadd_sub
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:120
↓ 1 callersFunctionanalyze_json
(data: &String)
src/json/json_parser.rs:125
↓ 1 callersMethodbyte_repeat_insert
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:281
↓ 1 callersMethodbyte_repeat_overwrite
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:267
↓ 1 callersFunctioncompile_sierra_program
Compile a Sierra program into a MLIR module
cairo-native-fuzzer/src/runner/runner.rs:18
↓ 1 callersMethodconvert_and_store_cairo_to_sierra
Compile the Cairo program to Sierra
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:137
↓ 1 callersFunctionconvert_integer_inputs_to_values
Converts integer inputs to the desired JSON format
test-generator/src/main.rs:104
↓ 1 callersMethodcopy
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:150
↓ 1 callersFunctioncreate_executor
Create a JIT Native Executor
cairo-native-fuzzer/src/runner/runner.rs:12
↓ 1 callersMethoddec_byte
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:111
↓ 1 callersMethoddetermine_argument_count
Determines the correct number of arguments by iteratively adding parameters and checking for deserialization errors.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:180
↓ 1 callersMethodexecute_program
Executes the program and checks for crashes.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:242
↓ 1 callersFunctionextract_function
(tmp: &serde_json::Map<String, Value>)
src/json/json_parser.rs:17
↓ 1 callersMethodfix_inputs_types
(&mut self)
src/mutator/mutator_felt252.rs:202
↓ 1 callersMethodflip_random_bit
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:66
↓ 1 callersMethodfuzz_proptesting
Fuzzes all functions that finish with "fuzz_*".
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:378
↓ 1 callersFunctiongenerate_fuzzing_data
Generates the fuzzing data for a given function
test-generator/src/main.rs:81
↓ 1 callersMethodgenerate_params
Generates parameters based on the function argument types.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:156
↓ 1 callersFunctionget_cairo_native_version
Return the current cairo-native package version
cairo-native-fuzzer/src/utils.rs:7
↓ 1 callersMethodget_entry_points
Returns a vector of strings with the entry points
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:306
↓ 1 callersFunctionget_function_argument_types
Returns a vector of the function parameter types For example, given a function with the prototype: ``` myfunction(a: felt252, b: felt252) -> felt252
cairo-native-fuzzer/src/fuzzer/utils.rs:45
↓ 1 callersFunctionget_function_by_id
Find and return the function with the given `FunctionId` in the `Program`
cairo-native-fuzzer/src/utils.rs:13
↓ 1 callersMethodget_input_by_index
(&self, index: usize)
src/fuzzer/stats.rs:45
↓ 1 callersFunctionget_integers_inputs
Parses the result of generate_test_cases_for_function and returns a vector of vectors of integer inputs
test-generator/src/main.rs:55
↓ 1 callersFunctionget_proptesting_functions
To test before deploying on master
src/json/json_parser.rs:168
↓ 1 callersMethodinc_byte
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:107
↓ 1 callersMethodinit
Initialize the fuzzer with a given seed - Initializes the mutator with the given seed - Compiles Cairo code to Sierra if needed - Finds the entry poin
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:112
↓ 1 callersMethodinput
(&self, _idx: usize)
src/mutator/mutator_felt252.rs:39
↓ 1 callersMethodinsert_inplace
Take the bytes from `source` for `len` bytes in the input, and insert a copy of them at `dest`
src/mutator/mutator_felt252.rs:688
↓ 1 callersMethodinter_splice
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:165
↓ 1 callersMethodmagic_insert
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:203
↓ 1 callersMethodmagic_overwrite
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:191
↓ 1 callersFunctionmap_argument_type
Helper function to map argument types based on their debug names This function takes a debug name string and returns the corresponding `ArgumentType`
cairo-native-fuzzer/src/mutator/argument_type.rs:10
↓ 1 callersMethodmax_input_size
Sets the maximum input size
src/mutator/mutator_felt252.rs:272
↓ 1 callersMethodmutate
Performs standard mutation of an the input
src/mutator/mutator_felt252.rs:278
↓ 1 callersMethodmutate
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:23
↓ 1 callersMethodmutate_parameters
Mutates the parameters using the mutator.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:274
↓ 1 callersMethodnum_inputs
(&self)
src/mutator/mutator_felt252.rs:36
↓ 1 callersMethodoverwrite_inplace
Take the bytes from `source` for `len` bytes in the input, and copy them to `dest`
src/mutator/mutator_felt252.rs:717
↓ 1 callersFunctionparse_line_inputs
Parses a single line of test cases and returns a vector of integer inputs
test-generator/src/main.rs:64
↓ 1 callersFunctionprint_contract_functions
Print the contract functions prototypes
cairo-native-fuzzer/src/fuzzer/utils.rs:77
↓ 1 callersFunctionprint_function_names
Prints the names of all available functions in the decompiler
test-generator/src/main.rs:35
↓ 1 callersMethodprint_functions_prototypes
Print the contract functions prototypes
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:131
↓ 1 callersFunctionprint_init_message
Print the initialization message
cairo-native-fuzzer/src/fuzzer/utils.rs:22
↓ 1 callersMethodprint_statistics
Prints the statistics every 1000 executions.
cairo-native-fuzzer/src/fuzzer/fuzzer.rs:282
↓ 1 callersMethodrand
Get a random 64-bit number using xorshift
src/custom_rand/rng.rs:18
↓ 1 callersMethodrand
Get a random 64-bit number using xorshift
cairo-native-fuzzer/src/custom_rand/rng.rs:21
↓ 1 callersMethodrand_usize
Get a random usize number using xorshift
src/custom_rand/rng.rs:28
↓ 1 callersMethodrandom_insert
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:241
↓ 1 callersMethodrandom_overwrite
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:228
↓ 1 callersFunctionsearch_for_function
(data: &Vec<Value>)
src/json/json_parser.rs:63
↓ 1 callersMethodseed
Sets the seed for the internal RNG
src/mutator/mutator_felt252.rs:262
↓ 1 callersMethodset_state
(mut self, state: StateCache)
src/runner/starknet_runner.rs:96
↓ 1 callersMethodsubtract_small_random_value
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:54
↓ 1 callersMethodswap
Swap two difference sequence of bytes in the input to different places
src/mutator/mutator_felt252.rs:637
↓ 1 callersMethodswap
(&mut self, felt: Felt)
cairo-native-fuzzer/src/mutator/basic_mutator.rs:135
↓ 1 callersMethodtypes
(mut self, types: Vec<String>)
src/mutator/mutator_felt252.rs:267
Methodadd_sub
Add or subtract a random amount with a random endianness from a random size `u8` through `u64`
src/mutator/mutator_felt252.rs:496
Methodbyte_repeat_insert
Find a byte and repeat it multiple times by splicing a random amount of the byte in
src/mutator/mutator_felt252.rs:869
Methodbyte_repeat_overwrite
Find a byte and repeat it multiple times by overwriting the data after it
src/mutator/mutator_felt252.rs:848
Methodcall_contract
( &mut self, address: Felt, entry_point_selector: Felt, calldata: &[Felt],
cairo-native-fuzzer/src/runner/syscall_handler.rs:120
Methodcopy
location in the input
src/mutator/mutator_felt252.rs:746
Methoddefault
()
cairo-native-fuzzer/src/fuzzer/statistics.rs:14
Methoddeploy
( &mut self, class_hash: Felt, contract_address_salt: Felt, calldata: &[Felt],
cairo-native-fuzzer/src/runner/syscall_handler.rs:87
Methoddump_json
Function to dump the inputs corpus
src/fuzzer/corpus_input.rs:179
Methodemit_event
(&mut self, keys: &[Felt], data: &[Felt], _gas: &mut u64)
cairo-native-fuzzer/src/runner/syscall_handler.rs:154
Methodexpand
Make space in the input, filling with zeros if `printable` is not set, and if it is set, then fill with spaces.
src/mutator/mutator_felt252.rs:461
Methodfuzz
(self)
src/fuzzer/starknet_worker.rs:49
Methodget_block_hash
(&mut self, block_number: u64, _gas: &mut u64)
cairo-native-fuzzer/src/runner/syscall_handler.rs:20
Methodget_class_hash_at
( &mut self, _contract_address: Felt, _remaining_gas: &mut u64, )
cairo-native-fuzzer/src/runner/syscall_handler.rs:278
Methodget_execution_info
( &mut self, _gas: &mut u64, )
cairo-native-fuzzer/src/runner/syscall_handler.rs:25
Methodget_execution_info_v2
( &mut self, _remaining_gas: &mut u64, )
cairo-native-fuzzer/src/runner/syscall_handler.rs:51
Methodinsert_rand
Create 1 or 2 random bytes and insert them into the input
src/mutator/mutator_felt252.rs:785
Methodinter_splice
Take one location of the input and splice it into another
src/mutator/mutator_felt252.rs:766
next →1–100 of 157, ranked by callers