(self, simgr, state, deviating_trace_idx, deviating_addr, kwargs)
return succs_dict
When a deviation happens, force the tracer to take the branch specified in the trace by manually setting the
        PC to the one in the trace. This method is only used in Permissive tracing mode.

        :param simgr:               The simulation manager instance.
        :param state:               The program state before the current step.
        :param deviating_trace_idx: The index of address in the trace where a desync happens.
        :param deviating_addr:      The address that tracer takes when the desync happens. Should be different from the
                                    one in the trace.
        :param kwargs:              Other keyword arguments that will be passed to step_state().
        :return:                    A new successor dict.
        :rtype:                     dict
When a deviation happens, force the tracer to take the branch specified in the trace by manually setting the
        PC to the one in the trace. This method is only used in Permissive tracing mode.
When a deviation happens force the tracer to take the branch specified in the trace by manually setting the PC to the one in the trace . This method is only used in Permissive tracing mode .
def _force_resync(self, simgr, state, deviating_trace_idx, deviating_addr, kwargs):
        """
        When a deviation happens, force the tracer to take the branch specified in the trace by manually setting the
        PC to the one in the trace. This method is only used in Permissive tracing mode.

        :param simgr:               The simulation manager instance.
        :param state:               The program state before the current step.
        :param deviating_trace_idx: The index of address in the trace where a desync happens.
        :param deviating_addr:      The address that tracer takes when the desync happens. Should be different from the
                                    one in the trace.
        :param kwargs:              Other keyword arguments that will be passed to step_state().
        :return:                    A new successor dict.
        :rtype:                     dict
        """

        # if unicorn engine is enabled, disable it. forced execution requires single-stepping in angr.
        unicorn_option_removed = False
        if sim_options.UNICORN in state.options:
            state.options.remove(sim_options.UNICORN)
            unicorn_option_removed = True

        # single step until right before the deviating state
        trace_idx = state.globals['trace_idx']
        while trace_idx != deviating_trace_idx - 1:
            succs_dict = simgr.step_state(state, **kwargs)
            succs = succs_dict[None]
            assert len(succs) == 1
            self._update_state_tracking(succs[0])
            state = succs[0]
            trace_idx += 1

        # step the state further and then manually set the PC
        succs_dict = simgr.step_state(state, **kwargs)
        succs = succs_dict[None]
        if len(succs) != 1 or succs[0].addr != deviating_addr:
            raise TracerDesyncError("Address mismatch during single-stepping.")
        succ = succs[0]
        expected_addr = self._trace[deviating_trace_idx]
        current_obj = self.project.loader.find_object_containing(state.addr)
        assert current_obj is not None
        translated_addr = self._translate_trace_addr(expected_addr, current_obj)
        l.info("Attempt to fix a deviation: Forcing execution from %#x to %#x (instead of %#x).",
               state.addr, succ.addr, translated_addr)
        succ._ip = translated_addr

        succ.globals['trace_idx'] = trace_idx + 1
        succs_dict = {None: [succ]}

        if unicorn_option_removed:
            succ.options.add(sim_options.UNICORN)

        return succs_dict
def _force_resync ( self , simgr , state , deviating_trace_idx , deviating_addr , kwargs ) : # if unicorn engine is enabled, disable it. forced execution requires single-stepping in angr. unicorn_option_removed = False if sim_options . UNICORN in state . options : state . options . remove ( sim_options . UNICORN ) unicorn_option_removed = True # single step until right before the deviating state trace_idx = state . globals [ 'trace_idx' ] while trace_idx != deviating_trace_idx - 1 : succs_dict = simgr . step_state ( state , * * kwargs ) succs = succs_dict [ None ] assert len ( succs ) == 1 self . _update_state_tracking ( succs [ 0 ] ) state = succs [ 0 ] trace_idx += 1 # step the state further and then manually set the PC succs_dict = simgr . step_state ( state , * * kwargs ) succs = succs_dict [ None ] if len ( succs ) != 1 or succs [ 0 ] . addr != deviating_addr : raise TracerDesyncError ( "Address mismatch during single-stepping." ) succ = succs [ 0 ] expected_addr = self . _trace [ deviating_trace_idx ] current_obj = self . project . loader . find_object_containing ( state . addr ) assert current_obj is not None translated_addr = self . _translate_trace_addr ( expected_addr , current_obj ) l . info ( "Attempt to fix a deviation: Forcing execution from %#x to %#x (instead of %#x)." , state . addr , succ . addr , translated_addr ) succ . _ip = translated_addr succ . globals [ 'trace_idx' ] = trace_idx + 1 succs_dict = { None : [ succ ] } if unicorn_option_removed : succ . options . add ( sim_options . UNICORN ) return succs_dict