A method, system, and apparatus for recovering form an instruction fetch
error is provided. In one embodiment, a data processing system maintains a
primary copy and an alternate copy of a set of instructions for a software
component. The instructions for performing the processes of the software
component are fetched from the primary copy for execution by a processor.
A pair of pointers is maintained in each copy identifying the beginning of
each copy. Responsive to a determination that an instruction fetch error
has been received, a corresponding current instruction in the alternate
copy is determined and the software component is restarted by fetching and
executing instructions from the alternate copy starting with the
corresponding current instruction. The corresponding current instruction
is determined by subtracting the beginning address of the copy with the
error from the address of the current instruction, then adding the
beginning address of the alternate copy.