节点文献
基于源代码插桩的C程序内存使用错误动态检测
Detecting of Memory Error in C Programs Based on Source Code Instrumentation
【摘要】 针对C程序内存使用错误的预防和处理方法分基于静态分析和动态分析两类。静态分析工具研制复杂 ,目前还没有得到广泛使用的高效工具。动态分析又分为基于目标代码和源代码插桩分析两类。由于缺少完整的语法、语义信息 ,基于目标代码的分析有时对错误的捕捉、定性不够精确。基于源代码的分析由于其信息的完整可以达到对错误的最精确报告。本文对C程序中的内存使用错误进行了分析 ,并讨论了一个C程序内存错误动态检测工具的设计思想 ,给出了系统流程、关键数据结构、错误捕捉方法的设计
【Abstract】 Methods to deal with memory errors in C programs are based on either static analysis or dynamic analysis. It is a hard work to design static analysis tool. There is still no static memory error analysis tool widely used. Dynamic analysis can base on either object code analysis or source code analysis. For lacking of integral grammar or semantic information, analysis of object code can not report error accurately in some cases. Analysis of source code can give the most accurate error report for the availability of the integrity of information. This paper discusses the classification and capturing of memory errors in C program, and presents part of the design of a memory error detector based on source code instrumentation and dynamic analysis.
【Key words】 C; Memory error; Pointer analysis; Instrumentation; Testing;
- 【文献出处】 舰船电子工程 ,Ship Electronic Engineering , 编辑部邮箱 ,2004年06期
- 【分类号】TP311.1
- 【被引频次】16
- 【下载频次】374