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, tcx: TyCtxt<'tcx>, fn_map: &MopAAResultMap, )
pub fn fill_birth(&mut self, node: usize, birth: isize)
pub fn projection(&mut self, is_right: bool, place: Place<'tcx>) -> usize
pub fn merge_alias(&mut self, lv: usize, rv: usize, depth: usize)
pub fn merge(&mut self, ret_alias: &MopAAFact, arg_vec: &Vec<usize>)
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn report_bugs(&self)
pub fn uaf_check( &mut self, bb_idx: usize, idx: usize, span: Span, is_fncall: bool, )
pub fn sync_drop_record(&mut self, idx: usize)
pub fn df_check( &mut self, bb_idx: usize, idx: usize, span: Span, flag_cleanup: bool, ) -> bool
pub fn dp_check(&mut self, flag_cleanup: bool)
pub fn add_to_drop_record( &mut self, idx: usize, via_idx: usize, birth: usize, info: &SourceInfo, flag_inprocess: bool, bb_idx: usize, flag_cleanup: bool, )
pub fn get_field_seq(&self, value: &Value) -> Vec<usize>
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn corner_handle( &mut self, _left_ssa: usize, _merge_vec: &Vec<usize>, def_id: DefId, ) -> bool
pub fn should_check(def_id: DefId) -> bool
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, tcx: TyCtxt<'tcx>)
pub fn drop_heap_item_check( &self, place: &Place<'tcx>, tcx: TyCtxt<'tcx>, ) -> bool
pub fn split_check( &mut self, bb_idx: usize, tcx: TyCtxt<'tcx>, fn_map: &MopAAResultMap, )
pub fn split_check_with_cond( &mut self, bb_idx: usize, path_discr_id: usize, path_discr_val: usize, tcx: TyCtxt<'tcx>, fn_map: &MopAAResultMap, )
pub fn check( &mut self, bb_idx: usize, tcx: TyCtxt<'tcx>, fn_map: &MopAAResultMap, )
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