1. A method comprising: executing, by at least one processor of a computer system, a series of instructions stored in a memory of the computer system; while executing a first instruction in the series of instructions, receiving an interrupt signal; in response to receiving the interrupt signal, halting execution of the first instruction; after halting execution of the first instruction, searching a first potential sequence of the series of instructions to identify a second instruction that is a safe point, the identifying of the second instruction based on whether the second instruction is in a list of eligible safe points, and replacing the second instruction in the series of instructions with a first instance of one or more interrupt handler instructions that initiate an interrupt handler; based on an identification of a second potential sequence of the series of instructions, searching the second potential sequence of the series of instructions to identify a third instruction that is a safe point, the identifying of the third instruction based on whether the third instruction is in the list of eligible safe points, and replacing the third instruction in the series of instructions with a second instance of the one or more interrupt handler instructions that initiate the interrupt handler, after replacing the second instruction, resuming execution of the first instruction.