• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2012, Vol. 34 ›› Issue (2): 73-77.

• 论文 • 上一篇    下一篇

GCC编译器中间代码层控制流扩充研究

何 涛1,周会平2,贾丽丽2,王发鸿1   

  1. (1.国防科学技术大学继续教育学院,湖南 长沙 410073;2.国防科学技术大学计算机学院,湖南 长沙 410073)
  • 收稿日期:2010-03-24 修回日期:2010-06-10 出版日期:2012-02-25 发布日期:2012-02-25

Research on the Expanding Intermediate Code for Control Flow Checking Based on GCC

HE Tao1,ZHOU Huiping2,JIA Lili2,WANG Fahong1   

  1. (1.School of Further Contin Education,National University of Defense Technology,Changsha  410073;2.School of Computer Science,National University of Defense Technology,Changsha 410073,China)
  • Received:2010-03-24 Revised:2010-06-10 Online:2012-02-25 Published:2012-02-25

摘要:

本文首先对CFCSS(控制流检错算法)进行了介绍,对GCC编译器的运行流程进行了简要分析,再次给出了在GCC编译器中扩充CFCSS算法的具体方法,最后通过故障注入实验对扩充后的GCC进行了有效性验证。实验表明,扩充了CFCSS算法的GCC编译器所编译的程序在运行过程中具有控制流检错能力。这为我们下一步的故障定位和故障恢复提供了有力的支持,为解决星载计算机的运行故障奠定了基础。

关键词: GCC;中间层代码;优化;控制流检错算法

Abstract:

The paper introduces  for CFCSS, briefly analyzes the running routine of the GCC compiler, gives the concrete methods for how to extend the CFCSS algorithm in the GCC compiler and then compiles a single C language program in the extended GCC. Finally, we perform the CFCSS algorithm’s valid verification by fault injection experiments. The experiment shows the new program can check the error of the control flow when it runs, which is compiled by the GCC compiler after extending the CFCSS algorithm. The above conclusion gives great support to positioning and recovering the faults in the next step and lays a good foundation for solving the computer running faults in the space.

Key words: GCC;intermediate code;optimization;control flow error detection algorithm