摘要:
如今程序控制流错误已成为影响嵌入式计算机可靠性的主要因素之一.在现实生活中,嵌入式系统的计算机受很多因素影响(比如辐射、硬件故障、环境干扰等),从而导致程序出现控制流错误使程序不能正常运行.传统的控制流检测算法具有配置不灵活、滞后性等缺点.对此,介绍了一种针对程序控制流错误的检测方法,该方法对程序进行基本块划分,为每个基本块设置静态标签,采用后继块信息标签,与程序运行时产生的动态标签进行匹配,从而检测控制流错误.每个基本块都在起始处和结束处各进行一次检测判断,双重检测判断可较有效地检测出控制流错误,并且该方法能够在当前基本块发现控制流错误,不延迟到后面的基本块,较有效地解决了基本块间检测的滞后性问题.%Now program control flow error has become one of the main factors that affect the reliability of embedded computer.In real life,the embedded system of the computer is affected by many factors (such as radiation,hardware failure,environmental interference, etc.),resulting in the program control flow error so that the program cannot run properly.The traditional control flow detection algorithm has the disadvantages of poor configuration and hysteresis.For this,we present a method of detecting the error of program control flow, which divides the program into basic blocks,sets static tags for each of them,and uses subsequent blocks of information to match the dy-namic tags generated when the program runs for detection of control flow error.Each of the basic blocks is subjected to a detection judg-ment at the beginning and at the end,and the double detection judgment can detect the control flow error more efficiently.The method can find that the control flow is erroneous in the current basic block and is not delayed until the basic block,which is more effective solution to the basic block between the detection of hysteresis.