Patent ID: 8782664
Filing Date: 2014-07-15
Classification: G06F

Abstract:
1. A computer system having a processor configured to autonomically patch computer program code, comprising: checking a flag in a machine status register to determine whether code patching functionality is to be enabled; responsive to determining that code patching functionality is to be enabled, enabling the code patching functionality; executing a computer program instruction, wherein the computer program instruction is located at a start of a block of code of an execution sequence of original code instructions; determining whether metadata is associated with the computer program instruction, wherein the metadata identifies the computer program instruction as a computer program instruction having associated patch instructions, and indicates an address of the patch instructions, wherein the patch instructions are created by: copying instructions from the block of code to a new memory location; modifying the order of the instructions of the block of code; and populating metadata with a pointer to the patch instructions; responsive to determining that the metadata is associated with the computer program instruction, redirecting execution to the patch instructions at the address indicated by the metadata; executing the patch instructions; returning to an instruction of the execution sequence of original code instructions in the computer program; and storing a result of executing the execution sequence.