pub struct RapCallback {Show 15 fields
pub(crate) alias: bool,
pub(crate) api_dependency: bool,
pub(crate) callgraph: bool,
pub(crate) dataflow: usize,
pub(crate) ownedheap: bool,
pub(crate) range: usize,
pub(crate) ssa: bool,
pub(crate) test: bool,
pub(crate) infer: bool,
pub(crate) opt: usize,
pub(crate) rcanary: bool,
pub(crate) safedrop: bool,
pub(crate) show_mir: bool,
pub(crate) unsafety_isolation: usize,
pub(crate) verify: bool,
}
Expand description
This is the data structure to handle rapx options as a rustc callback.
Fields§
§alias: bool
§api_dependency: bool
§callgraph: bool
§dataflow: usize
§ownedheap: bool
§range: usize
§ssa: bool
§test: bool
§infer: bool
§opt: usize
§rcanary: bool
§safedrop: bool
§show_mir: bool
§unsafety_isolation: usize
§verify: bool
Implementations§
Source§impl RapCallback
impl RapCallback
Sourcepub fn enable_alias(&mut self, arg: String)
pub fn enable_alias(&mut self, arg: String)
Enable alias analysis. The parameter is used to config the threshold of alias analysis. Currently, we mainly use it to control the depth of field-sensitive analysis. -alias0: set field depth limit to 10; do not distinguish different flows within a each strongly-connected component. -alias1: set field depth limit to 20 (this is default setting). -alias2: set field depth limit to 30.
Sourcepub fn is_alias_enabled(&self) -> bool
pub fn is_alias_enabled(&self) -> bool
Test if alias analysis is enabled.
Sourcepub fn enable_api_dependency(&mut self)
pub fn enable_api_dependency(&mut self)
Enable API-dependency graph generation.
Sourcepub fn is_api_dependency_enabled(self) -> bool
pub fn is_api_dependency_enabled(self) -> bool
Test if API-dependency graph generation is enabled.
Sourcepub fn enable_callgraph(&mut self)
pub fn enable_callgraph(&mut self)
Enable call-graph analysis.
Sourcepub fn is_callgraph_enabled(&self) -> bool
pub fn is_callgraph_enabled(&self) -> bool
Test if call-graph analysis is enabled.
Sourcepub fn enable_ownedheap(&mut self)
pub fn enable_ownedheap(&mut self)
Enable owned heap analysis.
Sourcepub fn is_ownedheap_enabled(self) -> bool
pub fn is_ownedheap_enabled(self) -> bool
Test if owned-heap analysis is enabled.
Sourcepub fn enable_dataflow(&mut self, x: usize)
pub fn enable_dataflow(&mut self, x: usize)
Enable dataflow analysis.
Sourcepub fn is_dataflow_enabled(self) -> usize
pub fn is_dataflow_enabled(self) -> usize
Test if dataflow analysis is enabled.
Sourcepub fn enable_range_analysis(&mut self, x: usize)
pub fn enable_range_analysis(&mut self, x: usize)
Enable range analysis.
Sourcepub fn is_range_analysis_enabled(self) -> bool
pub fn is_range_analysis_enabled(self) -> bool
Test if range analysis is enabled.
Sourcepub fn enable_test(&mut self)
pub fn enable_test(&mut self)
Enable test of features provided by the core analysis traits.
Sourcepub fn is_test_enabled(self) -> bool
pub fn is_test_enabled(self) -> bool
Check if test is enabled.
Sourcepub fn enable_ssa_transform(&mut self)
pub fn enable_ssa_transform(&mut self)
Enable ssa transformation
Sourcepub fn is_ssa_transform_enabled(self) -> bool
pub fn is_ssa_transform_enabled(self) -> bool
Test if ssa transformation is enabled.
Sourcepub fn enable_opt(&mut self, x: usize)
pub fn enable_opt(&mut self, x: usize)
Enable optimization analysis for performance bug detection.
Sourcepub fn is_opt_enabled(self) -> usize
pub fn is_opt_enabled(self) -> usize
Test if optimization analysis is enabled.
Sourcepub fn enable_rcanary(&mut self)
pub fn enable_rcanary(&mut self)
Enable rcanary for memory leakage detection.
Sourcepub fn is_rcanary_enabled(&self) -> bool
pub fn is_rcanary_enabled(&self) -> bool
Test if rcanary is enabled.
Sourcepub fn enable_safedrop(&mut self, arg: String)
pub fn enable_safedrop(&mut self, arg: String)
Enable safedrop for use-after-free bug detection. Similar to alias analysis, the second parameter is to control the depth threshold for field-sensitive analysis.
Sourcepub fn is_safedrop_enabled(&self) -> bool
pub fn is_safedrop_enabled(&self) -> bool
Test if safedrop is enabled.
Sourcepub fn enable_show_mir(&mut self)
pub fn enable_show_mir(&mut self)
Enable mir display.
Sourcepub fn is_show_mir_enabled(&self) -> bool
pub fn is_show_mir_enabled(&self) -> bool
Test if mir display is enabled.
pub fn enable_unsafety_isolation(&mut self, x: usize)
pub fn is_unsafety_isolation_enabled(&self) -> usize
pub fn enable_verify(&mut self)
pub fn is_verify_enabled(&self) -> bool
pub fn enable_infer(&mut self)
pub fn is_infer_enabled(&self) -> bool
Trait Implementations§
Source§impl Callbacks for RapCallback
impl Callbacks for RapCallback
Source§fn after_crate_root_parsing(
&mut self,
_compiler: &Compiler,
_krate: &mut Crate,
) -> Compilation
fn after_crate_root_parsing( &mut self, _compiler: &Compiler, _krate: &mut Crate, ) -> Compilation
Compilation::Continue
)Source§fn after_analysis<'tcx>(
&mut self,
_compiler: &Compiler,
tcx: TyCtxt<'tcx>,
) -> Compilation
fn after_analysis<'tcx>( &mut self, _compiler: &Compiler, tcx: TyCtxt<'tcx>, ) -> Compilation
Compilation::Continue
)Source§fn after_expansion<'tcx>(
&mut self,
_compiler: &Compiler,
_tcx: TyCtxt<'tcx>,
) -> Compilation
fn after_expansion<'tcx>( &mut self, _compiler: &Compiler, _tcx: TyCtxt<'tcx>, ) -> Compilation
Compilation::Continue
)Source§impl Clone for RapCallback
impl Clone for RapCallback
Source§fn clone(&self) -> RapCallback
fn clone(&self) -> RapCallback
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more