期刊文献+

基于CFG的函数调用关系静态分析方法 被引量:2

Static Analysis Method of Generating Function Call Relations Based on CFG
下载PDF
导出
摘要 函数调用关系能够反映软件系统中函数间的依赖关系,完整的函数调用关系可以更好地辅助程序验证和死锁分析,提升验证和分析的完备性.现有静态分析函数调用关系的方法不能准确分析函数指针和虚函数的调用,影响了其分析结果的准确性.针对这一问题本文提出了一种基于控制流图(Control Flow Graph,CFG)的函数调用关系静态分析方法,该方法首先使用GCC插件静态获取源代码中的类型和函数CFG等信息并构建分析路径,然后采用本文提出的模拟仿真算法分析程序中的语句,并解析函数指针和虚函数的调用,最后基于分析结果生成完整的函数调用关系.实验结果表明,该方法能够很好地支持对函数指针和虚函数的处理,提升了分析结果的准确性. 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 fimctions, 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.
出处 《计算机系统应用》 2015年第11期167-172,共6页 Computer Systems & Applications
基金 安徽省自然科学基金(1408085MKL06) 高等学校学科创新引智计划资助(B07033)
关键词 函数调用关系 静态分析 控制流图 函数指针 虚函数 function call relations static analysis control flow graph function pointer virtual function
  • 相关文献

参考文献11

  • 1孙卫真,杜香燕,向勇,汤卫东,侯鸿儒.基于RTL的函数调用图生成工具CG-RTL[J].小型微型计算机系统,2014,35(3):555-559. 被引量:7
  • 2Gustafsson Andreas.Egypt:create call graph from GCC RTL dump,http://www.gson.org/egypt/egypt.html.[2013-06-23].
  • 3Engler D,Ashcraft K.RacerX:effective,static detection of race conditions and deadlocks.Operating Systems Review,2003,37(5):237-252.
  • 4Bacon DF,Sweeney PR Fast static analysis of C++ virtual function calls.ACM Sigplan Notices,1996,31(10):324-341.
  • 5林立,王毅刚,叶飞.基于GCC的C/C++源程序静态信息提取技术[J].计算机与数字工程,2011,39(2):152-155. 被引量:5
  • 6Stanley DM,Xu D,Spafford EH.Improved kernel security through memory layout randomization.2013 IEEE 32nd International Performance Computing and Communications Conference (IPCCC).IEEE.2013.1-10.
  • 7Zheng Y,Mu Y,Zhang Z.Research on the static function call path generating automatically.The 2nd IEEE International Conference.2010.405-409.
  • 8Joseph P.A method to determine a basis set of paths to perform program testing,http://hissa.nist.gov/publications/ nistir5737/#sectionl.
  • 9Mgebrova K.CodeViz:a callgraph visualizer.http:// www.csn.ul.ie/-mel/projects/codeviz.[2012-02-16].
  • 10Source Insight:need to understand code.http://www.sourceinsight.com/support.HTML#Docs.[2013-03-16].

二级参考文献13

  • 1王相懂,张毅坤.基于GCC的抽象语法树对C++源程序结构的分析[J].计算机工程与应用,2006,42(23):97-99. 被引量:8
  • 2Stallman R M Using and Porting the GNU Compiler Collection[EB/OL].[2003-07-10].http://gcc.gnu.org/onlinedoes.
  • 3cygwin/gccMinGW[EB/OL].http://blog.csdn.net/listlike/archive/2005/05/12/373999.aspx.
  • 4MinGW的安装法[EB/OL].http://blog.chinaunix.net/u/16953/showart.php?id=1083247.
  • 5gcc for windows开发环境介绍[EB/OL].http://blog.cs-dn.net/Mobidogs/archive/2007/10/10/1819084.aspx.
  • 6Arthur Griffith.GCC:The Complete Reference[M].New York:The McGraw-Hill Companies,2002:506-514.
  • 7GCC Command Options[EB/OL].http://gcc.gnu.org/onlinedoes/gcc-3.0.4/gcc_3.html.
  • 8李鑫,王甜甜,苏小红等.消除GCC抽象语法树文本中冗余信息的算法研究.计算机工程与应用,2004,.
  • 9Xml Orientend Gnu AST Analyzer[EB/OL].[2010-08-10].http://xogastan.sourceforge.net.
  • 10G.Antoniol,M Di Penta,G.Masone,et aL XOgastan:XML-Oriented gcc AST Analysis and Transfor-mations[C]//Proceedings of the Third IEEE International Workshop on Source Code Analysis and Manipulation(SCAM'03),IEEE,2003.

共引文献10

同被引文献11

引证文献2

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部