pub struct SafeDropGraph<'tcx> {
pub mop_graph: MopGraph<'tcx>,
pub bug_records: BugRecords,
pub drop_record: Vec<DropRecord>,
pub adt_owner: OHAResultMap,
}Expand description
We represent each target function with the SafeDropGraph struct and then perform analysis
based on the struct.
Fields§
§mop_graph: MopGraph<'tcx>§bug_records: BugRecords§drop_record: Vec<DropRecord>§adt_owner: OHAResultMapImplementations§
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn alias_bb(&mut self, bb_index: usize)
pub fn alias_bbcall(&mut self, bb_index: usize, fn_map: &MopFnAliasMap)
pub fn assign_alias(&mut self, lv_idx: usize, rv_idx: usize)
pub fn sync_field_alias( &mut self, lv: usize, rv: usize, depth: usize, clear_left: bool, )
pub fn sync_father_alias( &mut self, lv: usize, rv: usize, lv_alias_set_idx: usize, )
pub fn projection(&mut self, place: Place<'tcx>) -> usize
pub fn handle_fn_alias(&mut self, fn_alias: &MopAliasPair, arg_vec: &Vec<usize>)
pub fn merge_alias(&mut self, e1: usize, e2: usize)
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn add_to_drop_record( &mut self, value_idx: usize, bb_idx: usize, _info: &SourceInfo, flag_cleanup: bool, )
pub fn push_drop_info(&mut self, value_idx: usize, drop_spot: LocalSpot)
pub fn push_drop_alias(&mut self, value_idx: usize, drop_spot: LocalSpot)
Sourcepub fn push_drop_top_down(&mut self, value_idx: usize, drop_spot: LocalSpot)
pub fn push_drop_top_down(&mut self, value_idx: usize, drop_spot: LocalSpot)
drop the fields of the root node.
pub fn push_drop_bottom_up(&mut self, value_idx: usize, drop_spot: LocalSpot)
pub fn fetch_drop_info(&mut self, value_idx: usize)
pub fn clear_drop_info(&mut self, value_idx: usize)
pub fn clear_father_drop(&mut self, value_idx: usize)
pub fn clear_field_drop(&mut self, value_idx: usize)
pub fn fetch_drop_from_bottom(&mut self, value_idx: usize)
pub fn fetch_drop_from_top(&mut self, value_idx: usize)
pub fn fetch_drop_from_alias(&mut self, value_idx: usize)
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn new(tcx: TyCtxt<'tcx>, def_id: DefId, adt_owner: OHAResultMap) -> Self
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn drop_check(&mut self, bb_idx: usize)
pub fn drop_heap_item_check(&self, place: &Place<'tcx>) -> bool
pub fn split_check(&mut self, bb_idx: usize, fn_map: &MopFnAliasMap)
pub fn split_check_with_cond( &mut self, bb_idx: usize, path_discr_id: usize, path_discr_val: usize, fn_map: &MopFnAliasMap, )
pub fn check(&mut self, bb_idx: usize, fn_map: &MopFnAliasMap)
pub fn check_scc(&mut self, bb_idx: usize, fn_map: &MopFnAliasMap)
pub fn check_single_node(&mut self, bb_idx: usize, fn_map: &MopFnAliasMap)
pub fn handle_nexts( &mut self, bb_idx: usize, fn_map: &MopFnAliasMap, exclusive_nodes: Option<&FxHashSet<usize>>, path_constraints: Option<&FxHashMap<usize, usize>>, )
pub fn report_bugs(&self)
pub fn uaf_check( &mut self, value_idx: usize, bb_idx: usize, span: Span, is_fncall: bool, )
pub fn rate_confidence(kind: ValueKind, fully_dropped: bool) -> usize
pub fn df_check( &mut self, value_idx: usize, bb_idx: usize, span: Span, flag_cleanup: bool, ) -> bool
pub fn dp_check(&mut self, flag_cleanup: bool)
Trait Implementations§
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