Function solana_program::program::invoke_unchecked
source · pub fn invoke_unchecked(
instruction: &Instruction,
account_infos: &[AccountInfo<'_>]
) -> ProgramResult
Expand description
Invoke a cross-program instruction but don’t enforce Rust’s aliasing rules.
This function is like invoke
except that it does not check that
RefCell
s within AccountInfo
s are properly borrowable as described in
the documentation for that function. Those checks consume CPU cycles that
this function avoids.
Safety
This function is incorrectly missing an unsafe
declaration.
If any of the writable accounts passed to the callee contain data that is borrowed within the calling program, and that data is written to by the callee, then Rust’s aliasing rules will be violated and cause undefined behavior.