pub struct SafeDropGraph<'tcx> {Show 17 fields
pub def_id: DefId,
pub tcx: TyCtxt<'tcx>,
pub span: Span,
pub values: Vec<ValueNode>,
pub blocks: Vec<BlockNode<'tcx>>,
pub arg_size: usize,
pub scc_indices: Vec<usize>,
pub constant: FxHashMap<usize, usize>,
pub return_set: FxHashSet<(usize, usize)>,
pub bug_records: BugRecords,
pub visit_times: usize,
pub alias_set: Vec<usize>,
pub dead_record: Vec<bool>,
pub adt_owner: AdtOwner,
pub child_scc: FxHashMap<usize, (BlockNode<'tcx>, SwitchTargets, FxHashSet<usize>)>,
pub disc_map: FxHashMap<usize, usize>,
pub terms: Vec<TerminatorKind<'tcx>>,
}
Fields§
§def_id: DefId
§tcx: TyCtxt<'tcx>
§span: Span
§values: Vec<ValueNode>
§blocks: Vec<BlockNode<'tcx>>
§arg_size: usize
§scc_indices: Vec<usize>
§constant: FxHashMap<usize, usize>
§return_set: FxHashSet<(usize, usize)>
§bug_records: BugRecords
§visit_times: usize
§alias_set: Vec<usize>
§dead_record: Vec<bool>
§adt_owner: AdtOwner
§child_scc: FxHashMap<usize, (BlockNode<'tcx>, SwitchTargets, FxHashSet<usize>)>
§disc_map: FxHashMap<usize, usize>
§terms: Vec<TerminatorKind<'tcx>>
Implementations§
source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn alias_bb(&mut self, bb_index: usize, tcx: TyCtxt<'tcx>)
pub fn alias_bbcall( &mut self, bb_index: usize, tcx: TyCtxt<'tcx>, fn_map: &FnMap, )
pub fn fill_birth(&mut self, node: usize, birth: isize)
pub fn projection( &mut self, tcx: TyCtxt<'tcx>, is_right: bool, place: Place<'tcx>, ) -> usize
pub fn merge_alias(&mut self, lv: usize, rv: usize)
pub fn merge(&mut self, ret_alias: &RetAlias, arg_vec: &Vec<usize>)
pub fn union_find(&mut self, e: usize) -> usize
pub fn union_merge(&mut self, e1: usize, e2: usize)
pub fn union_is_same(&mut self, e1: usize, e2: usize) -> bool
pub fn union_has_alias(&mut self, e: usize) -> bool
source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn report_bugs(&self)
pub fn uaf_check( &mut self, aliaset_idx: usize, span: Span, local: usize, is_func_call: bool, )
pub fn exist_dead( &mut self, node: usize, record: &mut FxHashSet<usize>, dangling: bool, ) -> bool
pub fn is_dangling(&mut self, local: usize) -> bool
pub fn df_check(&mut self, drop: usize, span: Span) -> bool
pub fn dp_check(&mut self, current_block: &BlockNode<'tcx>)
pub fn dead_node( &mut self, drop: usize, birth: usize, info: &SourceInfo, alias: bool, )
pub fn get_field_seq(&self, value: &ValueNode) -> Vec<usize>
source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn new( body: &Body<'tcx>, tcx: TyCtxt<'tcx>, def_id: DefId, adt_owner: AdtOwner, ) -> SafeDropGraph<'tcx>
pub fn tarjan( &mut self, index: usize, stack: &mut Vec<usize>, instack: &mut FxHashSet<usize>, dfn: &mut Vec<usize>, low: &mut Vec<usize>, time: &mut usize, )
pub fn solve_scc(&mut self)
pub fn dfs_on_spanning_tree( &self, index: usize, stack: &mut Vec<usize>, paths: &mut Vec<Vec<usize>>, )
pub fn get_paths(&self) -> Vec<Vec<usize>>
pub fn switch_target( &mut self, tcx: TyCtxt<'tcx>, block_index: usize, ) -> Option<usize>
source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn drop_check(&mut self, bb_index: usize, tcx: TyCtxt<'tcx>)
pub fn drop_heap_item_check( &self, place: &Place<'tcx>, tcx: TyCtxt<'tcx>, ) -> bool
pub fn split_check( &mut self, bb_index: usize, tcx: TyCtxt<'tcx>, fn_map: &FnMap, )
pub fn split_check_with_cond( &mut self, bb_index: usize, path_discr_id: usize, path_discr_val: usize, tcx: TyCtxt<'tcx>, fn_map: &FnMap, )
pub fn check(&mut self, bb_index: usize, tcx: TyCtxt<'tcx>, fn_map: &FnMap)
pub fn calculate_scc_order( &mut self, scc: &Vec<usize>, path: &mut Vec<usize>, ans: &mut Vec<Vec<usize>>, disc_map: &mut HashMap<usize, usize>, idx: usize, root: usize, visit: &mut HashSet<usize>, )
Auto Trait Implementations§
impl<'tcx> Freeze for SafeDropGraph<'tcx>
impl<'tcx> !RefUnwindSafe for SafeDropGraph<'tcx>
impl<'tcx> !Send for SafeDropGraph<'tcx>
impl<'tcx> !Sync for SafeDropGraph<'tcx>
impl<'tcx> Unpin for SafeDropGraph<'tcx>
impl<'tcx> !UnwindSafe for SafeDropGraph<'tcx>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more