solana_cpi

Function invoke_signed_unchecked

Source
pub fn invoke_signed_unchecked(
    instruction: &Instruction,
    account_infos: &[AccountInfo<'_>],
    signers_seeds: &[&[&[u8]]],
) -> ProgramResult
Expand description

Invoke a cross-program instruction with signatures but don’t enforce Rust’s aliasing rules.

This function is like invoke_signed except that it does not check that RefCells within AccountInfos 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.