rapx::analysis::rcanary::ranalyzer

Struct IntraFlowAnalysis

source
struct IntraFlowAnalysis<'tcx, 'ctx, 'a> {
    rcx: &'a rCanary<'tcx>,
    icx: IntraFlowContext<'tcx, 'ctx>,
    icx_slice: IcxSliceFroBlock<'tcx, 'ctx>,
    did: DefId,
    body: &'a Body<'tcx>,
    graph: &'a Graph,
    elasped: Elapsed,
    taint_flag: bool,
    taint_source: Vec<Terminator<'tcx>>,
}

Fields§

§rcx: &'a rCanary<'tcx>§icx: IntraFlowContext<'tcx, 'ctx>§icx_slice: IcxSliceFroBlock<'tcx, 'ctx>§did: DefId§body: &'a Body<'tcx>§graph: &'a Graph§elasped: Elapsed§taint_flag: bool§taint_source: Vec<Terminator<'tcx>>

Implementations§

source§

impl<'tcx, 'ctx, 'a> IntraFlowAnalysis<'tcx, 'ctx, 'a>

source

pub(crate) fn visit_body( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, body: &'tcx Body<'tcx>, )

source

pub(crate) fn visit_block_data( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, data: &'tcx BasicBlockData<'tcx>, bidx: usize, )

source

pub(crate) fn preprocess_for_basic_block( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, bidx: usize, )

source

pub(crate) fn reprocess_for_basic_block(&mut self, bidx: usize)

source

pub(crate) fn visit_statement( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, stmt: &Statement<'tcx>, bidx: usize, sidx: usize, )

source

pub(crate) fn visit_terminator( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, term: &'tcx Terminator<'tcx>, bidx: usize, )

source

pub(crate) fn visit_assign( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, lplace: &Place<'tcx>, rvalue: &Rvalue<'tcx>, disc: Option<VariantIdx>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_copy( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_move( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_copy_from_field( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_move_from_field( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_aggregate_init( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, _aggre_did: DefId, vidx: VariantIdx, disc: Option<VariantIdx>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_copy_to_field( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, disc: Option<VariantIdx>, aggre: Option<usize>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_move_to_field( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, disc: Option<VariantIdx>, aggre: Option<usize>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_copy_field_to_field( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, disc: Option<VariantIdx>, aggre: Option<usize>, bidx: usize, sidx: usize, )

source

pub(crate) fn handle_move_field_to_field( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, _kind: AsgnKind, lplace: &Place<'tcx>, rplace: &Place<'tcx>, disc: Option<VariantIdx>, aggre: Option<usize>, bidx: usize, sidx: usize, )

source

pub(crate) fn check_fn_source( &mut self, args: &Box<[Spanned<Operand<'tcx>>]>, dest: &Place<'tcx>, ) -> bool

source

pub(crate) fn check_fn_recovery( &mut self, args: &Box<[Spanned<Operand<'tcx>>]>, dest: &Place<'tcx>, ) -> (bool, Vec<usize>)

source

pub(crate) fn handle_call( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, term: Terminator<'tcx>, func: &Operand<'tcx>, args: &Box<[Spanned<Operand<'tcx>>]>, dest: &Place<'tcx>, bidx: usize, )

source

pub(crate) fn handle_return( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, bidx: usize, )

source

pub(crate) fn handle_drop( &mut self, ctx: &'ctx Context, goal: &'ctx Goal<'ctx>, solver: &'ctx Solver<'ctx>, dest: &Place<'tcx>, bidx: usize, recovery: bool, )

source

pub(crate) fn handle_intra_var_unsupported(&mut self, idx: usize)

source

pub(crate) fn handle_taint(&mut self, l: usize, r: usize)

source

pub(crate) fn extract_default_ty_layout( &mut self, ty: Ty<'tcx>, variant: Option<VariantIdx>, ) -> OwnershipLayoutResult

source

pub(crate) fn generate_ptr_layout( &mut self, ty: Ty<'tcx>, variant: Option<VariantIdx>, ) -> RustBV

source

fn extract_projection( &self, place: &Place<'tcx>, aggre: Option<usize>, ) -> ProjectionSupport<'tcx>

source§

impl<'tcx, 'ctx, 'a> IntraFlowAnalysis<'tcx, 'ctx, 'a>

source

pub fn new(rcx: &'a rCanary<'tcx>, did: DefId) -> Self

source

pub fn did(&self) -> DefId

source

pub fn body(&self) -> &'a Body<'tcx>

source

pub fn owner(&self) -> &AdtOwner

source

pub fn graph(&self) -> &Graph

source

pub fn get_time_build(&self) -> i64

source

pub fn get_time_solve(&self) -> i64

source

pub fn add_taint(&mut self, terminator: Terminator<'tcx>)

Trait Implementations§

source§

impl<'tcx, 'ctx, 'o, 'a> IcxMut<'tcx, 'ctx, 'o> for IntraFlowAnalysis<'tcx, 'ctx, 'a>

source§

fn icx(&'o self) -> &'o IntraFlowContext<'tcx, 'ctx>

source§

fn icx_mut(&'o mut self) -> &'o mut IntraFlowContext<'tcx, 'ctx>

source§

impl<'tcx, 'ctx, 'o, 'a> IcxSliceMut<'tcx, 'ctx, 'o> for IntraFlowAnalysis<'tcx, 'ctx, 'a>

source§

fn icx_slice(&'o self) -> &'o IcxSliceFroBlock<'tcx, 'ctx>

source§

fn icx_slice_mut(&'o mut self) -> &'o mut IcxSliceFroBlock<'tcx, 'ctx>

source§

impl<'tcx, 'ctx, 'o, 'a> Rcx<'tcx, 'o, 'a> for IntraFlowAnalysis<'tcx, 'ctx, 'a>

source§

fn rcx(&'o self) -> &'a rCanary<'tcx>

source§

fn tcx(&'o self) -> TyCtxt<'tcx>

Auto Trait Implementations§

§

impl<'tcx, 'ctx, 'a> Freeze for IntraFlowAnalysis<'tcx, 'ctx, 'a>

§

impl<'tcx, 'ctx, 'a> !RefUnwindSafe for IntraFlowAnalysis<'tcx, 'ctx, 'a>

§

impl<'tcx, 'ctx, 'a> !Send for IntraFlowAnalysis<'tcx, 'ctx, 'a>

§

impl<'tcx, 'ctx, 'a> !Sync for IntraFlowAnalysis<'tcx, 'ctx, 'a>

§

impl<'tcx, 'ctx, 'a> Unpin for IntraFlowAnalysis<'tcx, 'ctx, 'a>

§

impl<'tcx, 'ctx, 'a> !UnwindSafe for IntraFlowAnalysis<'tcx, 'ctx, 'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.