引用本文: | 邱景,苏小红,马培军.一种使用静态分析的汇编代码缺陷检测方法[J].哈尔滨工业大学学报,2013,45(2):53.DOI:10.11918/j.issn.0367-6234.2013.02.010 |
| QIU Jing,SU Xiaohong,MA Peijun
.Defect detection for assembly codes based on static analysis[J].Journal of Harbin Institute of Technology,2013,45(2):53.DOI:10.11918/j.issn.0367-6234.2013.02.010 |
|
摘要: |
针对当前缺乏汇编代码自动化审查工具的情况,对汇编代码人工审查方法进行研究,提出了一种基于静态分析的汇编代码缺陷检测方法.该方法中,在控制流线性化后,运用特征识别处理间接寻址跳转,采用结点克隆处理延迟条件分支,使用调用序列处理存在递归函数的过程间控制流图的构造.在此基础上,实现了ADSP SHARC汇编代码检测工具,并进行了静态分析测试和缺陷检测测试.测试结果表明,该方法可以有效地检测汇编代码中的不可退出点、循环、寄存器、以及内存访问缺陷. |
关键词: 汇编代码 静态分析 缺陷检测 延迟分支 |
DOI:10.11918/j.issn.0367-6234.2013.02.010 |
分类号: |
基金项目:国家自然科学基金资助项目 (61173021). |
|
Defect detection for assembly codes based on static analysis |
QIU Jing, SU Xiaohong, MA Peijun
|
(School of Computer Science and Technology, Harbin Institute of Technology,150001 Harbin, China)
|
Abstract: |
Aiming at the present situation that needs to develop a code review tool for assembly codes, this paper studies the procedure of manual code reviews and proposes a method to detect defects in assembly codes based on static analysis. After the control flow linearization, compiler patterns are used to solve indirect jumps, and node cloning is used to recover the control flow of the delayed branch. In the construction of inter-procedural control flow graph, the recursive function is in-lined by means of a call trace with limited depth. The prototyping tool for ADSP SHARC assembly codes is realized finally. Experimental results show that the tool can effectively detect defects in loops, registers, and memory accessing. |
Key words: assembly code static analysis defect detection delayed branch
|