Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn run_asm(data: &[u8]) -> Result<(i8, u64), Error> {
.build();
let mut machine = AsmMachine::new(core);
let program = Bytes::copy_from_slice(data);
machine.load_program(&program, &[])?;
machine.load_program(&program, vec![].into_iter())?;
let exit_code = machine.run()?;
let cycles = machine.machine.cycles();
Ok((exit_code, cycles))
Expand All @@ -35,7 +35,7 @@ fn run_int(data: &[u8]) -> Result<(i8, u64), Error> {
.build(),
);
let program = Bytes::copy_from_slice(data);
machine.load_program(&program, &[])?;
machine.load_program(&program, vec![].into_iter())?;
let exit_code = machine.run()?;
let cycles = machine.machine.cycles();
Ok((exit_code, cycles))
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn run(data: &[u8]) -> Result<(i8, u64), Error> {
.build(),
);
let program = Bytes::copy_from_slice(data);
machine.load_program(&program, &[])?;
machine.load_program(&program, vec![].into_iter())?;
let exit_code = machine.run()?;
let cycles = machine.machine.cycles();
Ok((exit_code, cycles))
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fuzz_target!(|data: &[u8]| {
AsmMachine::new(machine)
};
let program = Bytes::copy_from_slice(data);
if machine1.load_program(&program, &[]).is_err() {
if machine1.load_program(&program, vec![].into_iter()).is_err() {
return;
};
let result1 = machine1.run();
Expand All @@ -32,7 +32,7 @@ fuzz_target!(|data: &[u8]| {
.build();
AsmMachine::new(machine)
};
machine2.load_program(&program, &[]).unwrap();
machine2.load_program(&program, vec![].into_iter()).unwrap();
let result2 = machine2.run();
assert_eq!(result2.unwrap_err(), Error::CyclesExceeded);
let snap = snapshot::make_snapshot(&mut machine2.machine).unwrap();
Expand Down
3 changes: 2 additions & 1 deletion fuzz/fuzz_targets/snapshot2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ fuzz_target!(|data: [u8; 96]| {

let mut machine1 = build_machine();
let mut machine2 = build_machine();
let result = machine1.load_program_with_metadata(&dummy_data.program, &metadata, &vec![]);
let result =
machine1.load_program_with_metadata(&dummy_data.program, &metadata, vec![].into_iter());
if result.is_err() {
return;
}
Expand Down
Loading