Method for detecting error of program control flow

2009 
The invention discloses a method for detecting the error of a program control flow and intends to overcome the difficulties in increasing the detection rate of the errors of the control flow by the conventional method and solve the difficult problem with the detection of the control flow inside basic blocks and among processes. The method comprises the following steps according to the technical scheme of the invention: firstly, identifying basic blocks and confirming the routing relation among the basic blocks; then, confirming the maximum required number of detection commands of the internal control flow of each basic block according to the requirements of the internal control flow and the constitutive characteristics of the basic blocks; designing the labels for the basic blocks on that basis, and distributing the unique static label to each basic block; then, inserting the detection commands into the head part, inner part and tail part of each basic block in the program respectively, re-assembling and re-linking the assembler of the inserted detection commands of the control flow, and generating an executable program for achieving the detection of the error of the control flow.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []