计算机与现代化 ›› 2020, Vol. 0 ›› Issue (08): 41-50.doi: 10.3969/j.issn.1006-2475.2020.08.007

• 算法分析与设计 • 上一篇    下一篇

一种检测控制流错误的多层分段标签方法

  

  1. (1.南京航空航天大学计算机科学与技术学院,江苏南京211106;2.中华中学,江苏南京211106)
  • 收稿日期:2019-12-26 出版日期:2020-08-17 发布日期:2020-08-17
  • 作者简介:郑伟宁(1994-),男,黑龙江佳木斯人,硕士研究生,研究方向:软件可靠性,E-mail: zhengweining@nuaa.edu.cn; 庄毅(1956-),女,江苏南京人,教授,研究方向:信息安全,网络,分布计算,E-mail: zy16@nuaa.edu.cn; 顾浩为(2002-),男,江苏南京人,E-mail: zq-009@163.com。
  • 基金资助:
    国家自然科学基金资助项目(61572253); “十三五”装备预研领域基金资助项目(61402420101HK02001)

Control Flow Error Detection Method Based on Multi-layer Segmented Labels

  1. (1. College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China;
    2. Zhonghua High School, Nanjing 211106, China)
  • Received:2019-12-26 Online:2020-08-17 Published:2020-08-17

摘要: 提出一种利用多层分段标签实现的控制流错误检测技术CFMSL,可通过对多层分段标签的更新和检查在线检测出程序的控制流错误。CFMSL在编译时将标签更新与检查指令自动嵌入程序中,从而实现程序运行时的动态检查效果。本文提出的标签设计与计算方法较为新颖,可较大地降低方法的时空开销,并且具有处理复杂程序以及检测细微控制流错误的能力。通过编写的LLVM pass文件,CFMSL具备批量化、自动化处理程序的能力。最后使用本文设计的故障注入工具模拟控制流错误对软件的影响,同时评估CFMSL的错误检测能力与时空开销。实验结果表明,相较于其他方法,CFMSL在保证较高检错能力的同时具有较低时空开销,显示出了本文提出的方法的优越性。

关键词: 多层分段标签, 控制流错误, 错误检测, 故障注入, 开销

Abstract: A control flow error detection method based on Multi-layer Segmented Labels (CFMSL) is proposed, which detects the control flow errors of the program online by updating and checking the multi-layer segmented labels. CFMSL can automatically embed label update and inspection instructions into the program during compile time, so as to realize dynamic inspection effect during program execution. The label design and calculation methods proposed in this paper are creative, which reduces the time and space complexity greatly, and has the abilities to handle complex programs and detect subtle control flow errors. CFMSL has the ability of batch and automation processing program through LLVM pass files. Finally, the fault injection tool designed in this paper is used to simulate the impact of control flow errors on software. At the same time, the error detection capabilities and overhead of CFMSL are evaluated. The experimental results show that compared with other methods, CFMSL has a lower overhead on the time and space and has higher error detection capabilities, which shows the superiority of the proposed method.

Key words: multi-layer segment labels, control flow errors, error detection, fault injection, overhead

中图分类号: