Skip to content

Commit

Permalink
fix fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
holykol committed Nov 14, 2023
1 parent 3931497 commit fca257c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 1 addition & 3 deletions core-backend/src/funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,7 @@ where
UndefinedTerminationReason::Actor(ActorTerminationReason::Trap(
TrapExplanation::Unknown,
))
})?;

Ok(())
})
})
}

Expand Down
8 changes: 1 addition & 7 deletions pallets/gear/src/benchmarking/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,7 @@ where
.checked_sub(1)
.and_then(|x| start.checked_add(x))
.unwrap();
instructions.extend([
I32Const(start as i32),
I32Const(end as i32),
Call(1),
I32Const(0),
]);
unreachable_condition(&mut instructions, I32Ne); // if free returns 0 then it's error
instructions.extend([I32Const(start as i32), I32Const(end as i32), Call(1)]);
}
}

Expand Down
2 changes: 1 addition & 1 deletion utils/wasm-instrument/src/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl SysCallName {
match self {
Self::Alloc => SysCallSignature::system([Alloc], [I32]),
Self::Free => SysCallSignature::system([Free], [I32]),
Self::FreeRange => SysCallSignature::system([Free, FreeUpperBound], [I32]),
Self::FreeRange => SysCallSignature::system([Free, FreeUpperBound], []),
Self::Debug => SysCallSignature::gr([
Ptr(PtrInfo::new_immutable(PtrType::SizedBufferStart {
length_param_idx: 1,
Expand Down

0 comments on commit fca257c

Please sign in to comment.