'Internal function to step a single state forward.
:param a:               The state.
:param successor_func:  A function to run on the state instead of doing a.step().
:param resilience:      Quash all errors (and put the offending state in the errored stash).
:returns:               A dict mapping stash names to state lists'

def _one_state_step(self, a, successor_func=None, resilience=None, **kwargs):

    new_stashes = {}
    if self._hierarchy:
        kwargs['strong_reference'] = True
    try:
        for hook in self._hooks_step_state:
            argspec = inspect.getargspec(hook)
            if ((argspec.keywords is None) and ('strong_reference' not in argspec.args)):
                del kwargs['strong_reference']
            out = hook(a, **kwargs)
            if (out is not None):
                if isinstance(out, tuple):
                    l.warning('step_state    returning    a    tuple    has    been    deprecated!    Please    return    a    dict    of    stashes    instead.')
                    (a, unconst, unsat, p, e) = out
                    out = {'active': a, 'unconstrained': unconst, 'unsat': unsat, 'pruned': p}
                new_stashes = self._make_stashes_dict(**out)
                break
        else:
            if (successor_func is not None):
                ss = successor_func(a)
            else:
                ss = self._project.factory.successors(a, **kwargs)
            new_stashes = self._make_stashes_dict(active=ss.flat_successors, unconstrained=ss.unconstrained_successors, unsat=ss.unsat_successors, orig=a)
    except (SimUnsatError, claripy.UnsatError) as e:
        new_stashes = self._make_stashes_dict(pruned=[a])
        if self._hierarchy:
            self._hierarchy.unreachable_state(a)
            self._hierarchy.simplify()
    except (AngrError, SimError, claripy.ClaripyError) as e:
        self.errored.append(ErrorRecord(a, e, sys.exc_info()[2]))
    except (TypeError, ValueError, ArithmeticError, MemoryError) as e:
        if ((resilience is False) or (not self._resilience)):
            raise
        self.errored.append(ErrorRecord(a, e, sys.exc_info()[2]))
    return new_stashes
