基于CFG的函数调用关系静态分析方法
DOI:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

安徽省自然科学基金(1408085MKL06);高等学校学科创新引智计划资助(B07033)


Static Analysis Method of Generating Function Call Relations Based on CFG
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 增强出版
  • |
  • 文章评论
    摘要:

    函数调用关系能够反映软件系统中函数间的依赖关系,完整的函数调用关系可以更好地辅助程序验证和死锁分析,提升验证和分析的完备性.现有静态分析函数调用关系的方法不能准确分析函数指针和虚函数的调用,影响了其分析结果的准确性.针对这一问题本文提出了一种基于控制流图(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.

    参考文献
    相似文献
    引证文献
引用本文

黄双玲,黄章进,顾乃杰.基于CFG的函数调用关系静态分析方法.计算机系统应用,2015,24(11):167-172

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2015-03-10
  • 最后修改日期:2015-04-26
  • 录用日期:
  • 在线发布日期: 2015-12-03
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京海淀区中关村南四街4号 中科院软件园区 7号楼305房间,邮政编码:100190
电话:010-62661041 传真: Email:csa (a) iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号