Patent ID: 8141055
Filing Date: 2012-03-20
Classification: G06F

Abstract:
1. A method for dynamic discovery of code segments in instrumented binary modules, in which a processor in a computer executes instructions to perform the method, the method comprising: receiving on the computer an instrumented program comprising confirmed code segments and potential code segments, the confirmed code segments corresponding to code containing instructions; wherein the confirmed code segments are stored in a dynamic code discovery table; wherein the potential code segments are stored in a potential code discovery table; inserting calls to a checking routine before all branch instructions with branch targets in the instrumented program at the potential code segments for dynamic code discovery on the computer, the branch targets being unknown at instrumentation time; running the instrumented program on the computer; executing the checking routine to check actual branch targets against the potential code segments in the potential code discovery table and to make appropriate entries in the dynamic code discovery table if there is a match; marking the potential code segments as marked potential code segments when there is the match for the branch targets on the computer; moving the marked potential code segments from the potential code discovery table to the dynamic code discovery table on the computer; and storing the marked potential code segments as the confirmed code segments in the dynamic code discovery table.