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

Static Analysis Method of Generating Function Call Relations Based on CFG

在线阅读下载全文

作  者:黄双玲 黄章进[2] 顾乃杰[3] 

机构地区:[1]中国科学技术大学计算机科学与技术学院,合肥230027 [2]中国科学技术大学安徽省计算与通信软件重点实验室,合肥230027 [3]中国科学技术大学先进技术研究院,合肥230027

出  处:《计算机系统应用》2015年第11期167-172,共6页Computer Systems & Applications

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

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

关 键 词:函数调用关系 静态分析 控制流图 函数指针 虚函数 

分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象