MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / mask_entry

Method mask_entry

icicle-cortexm/src/lib.rs:770–787  ·  view source on GitHub ↗
(self, env: &mut FuzzwareEnvironment, cpu: &mut Cpu)

Source from the content-addressed store, hash-verified

768
769impl CovMasking {
770 pub fn mask_entry(self, env: &mut FuzzwareEnvironment, cpu: &mut Cpu) {
771 match self {
772 Self::HitCounts { prev_pc_var } => {
773 let prev_pc = cpu.read_var::<u16>(prev_pc_var);
774 env.saved_prev = Some(prev_pc as u64);
775 cpu.write_var(prev_pc_var, 0_u16);
776 }
777 Self::ExactEdgeCov { hook } => {
778 let hook = cpu
779 .get_hook_mut(hook)
780 .data_mut::<icicle_fuzzing::coverage::EdgeHookData>()
781 .unwrap();
782 env.saved_prev = Some(hook.prev);
783 hook.prev = 0;
784 }
785 Self::None => {}
786 }
787 }
788
789 pub fn mask_return(self, env: &mut FuzzwareEnvironment, cpu: &mut Cpu) {
790 match self {

Callers 1

push_stackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected