###
DOI:
计算机系统应用英文版:2015,24(11):167-172
本文二维码信息
码上扫一扫!
基于CFG的函数调用关系静态分析方法
黄双玲1,2,3, 黄章进1,2,3, 顾乃杰1,2,3
(1.中国科学技术大学计算机科学与技术学院, 合肥 230027;2.中国科学技术大学安徽省计算与通信软件重点实验室, 合肥 230027;3.中国科学技术大学先进技术研究院, 合肥 230027)
Static Analysis Method of Generating Function Call Relations Based on CFG
(1.School of Computer Science and Technology, University of Science and Technology of China, Hefei 230027, China;2.Anhui Province Key Laboratory of Computing and Communication Software, Hefei 230027, China;3.Institute of Advanced Technology, University of Science and Technology of China, Hefei 230027, China)
摘要
图/表
参考文献
相似文献
本文已被:浏览 1987次   下载 4172
Received:March 10, 2015    Revised:April 26, 2015
中文摘要: 函数调用关系能够反映软件系统中函数间的依赖关系,完整的函数调用关系可以更好地辅助程序验证和死锁分析,提升验证和分析的完备性.现有静态分析函数调用关系的方法不能准确分析函数指针和虚函数的调用,影响了其分析结果的准确性.针对这一问题本文提出了一种基于控制流图(Control Flow Graph, CFG)的函数调用关系静态分析方法,该方法首先使用GCC插件静态获取源代码中的类型和函数CFG等信息并构建分析路径,然后采用本文提出的模拟仿真算法分析程序中的语句,并解析函数指针和虚函数的调用,最后基于分析结果生成完整的函数调用关系.实验结果表明,该方法能够很好地支持对函数指针和虚函数的处理,提升了分析结果的准确性.
Abstract:Function call relations can be used to reveal the dependency relations between functions in software systems. An integrated function call relation makes a good contribution to program verification and deadlock analysis, and improves the completeness of verification and analysis. Existing methods of function call relations based on static analysis do not provide integrated support for function pointers or virtual functions, which lowers the accuracy of analysis result. This paper proposes a static analysis method for function call relations generation based on Control Flow Graph(CFG). This method gains source file information by a GCC plugin, and predicts function analysis paths. Then it uses a simulation algorithm proposed by this paper to analyze the statements of those paths, while the call of function pointers and virtual functions are analyzed accurately. It generates full function call relations based on the analysis result. Experimental results show that this method can support the analysis of function pointers and virtual functions, and improves the accuracy of analysis results.
文章编号:     中图分类号:    文献标志码:
基金项目:安徽省自然科学基金(1408085MKL06);高等学校学科创新引智计划资助(B07033)
引用文本:
黄双玲,黄章进,顾乃杰.基于CFG的函数调用关系静态分析方法.计算机系统应用,2015,24(11):167-172
HUANG Shuang-Ling,HUANG Zhang-Jin,GU Nai-Jie.Static Analysis Method of Generating Function Call Relations Based on CFG.COMPUTER SYSTEMS APPLICATIONS,2015,24(11):167-172