4内存泄漏性质描述-四川大学.doc

4内存泄漏性质描述-四川大学

基于有界检测C程序内存泄? 黄蔚, 洪玫+, 杨秋辉, 郭鑫宇, 代声馨, 徐保平 (四川大学 计算机学院, Abstract: Since a free, flexible dynamic memory management mechanism in C programming language, it is easy to make mistakes of memory leak that lead to performance degradation or errors of system. Model checking is one of the important formal verification methods to be used to verify whether the system satisfied a certain property. Model checking tools for C program memory leak detection face the problem of the effectiveness and performance deficiencies. It is still a research problem. Based on the model checking tool CBMC, we design a memory leak detection method for C program called MLD-CBMC (Memory Leak Detecting - C Bounded Model Checker). This method combined the symbolic model checking and bounded model checking, modeling of the source code, using satisfiability modulo theory and logic to solve the state space of the model, and finally giving the traces which caused the leak. Compared with other bounded model checking tools, MLD-CBMC showed its ability in memory leak detecting. Key words: c program; memory leak; bounded model checking; Satisfiability Modulo Theories 摘 要: C语言中动态内存管理机制灵活但开发人员在动态内存时容易内存泄漏的性能。的形式化方法之一,用于验证系统是否满足某一。的中和性能上的准确和内存泄漏仍然是一个研究问题。(Memory Leak Detecting - C Bounded Model Checker)。该方案以C/C++程序文件为输入,提出了针对不同内存泄漏类型的属性描述,利用可满足性模理论(Satisfiability Modulo Theories ,SMT)对程序和属性编码为验证条件,使用SMT求解器Z3对验证条件求解,以实现C程序内存泄漏的检测。通过与其他有界模型检测工具的对比实验,验证了程序性理论 嵌入式系统、软件现如今已成为人类生活中必不可少的一部分,在、运输、探测、国防等安全攸关的,程序都重要的角色是程序的开发语言 有界模型检测[1](Bounded Model Checking)是对于程序中一些无穷的结构 可满足性模理论(Satisfiability Modulo Theories ,SMT)问题是在可满足性问题(SATisfiability)基础上扩展而来的。SAT 问题的描述属于命题逻辑范畴,表达能力相对较弱,SMT问题使用一阶逻辑,在命题逻辑基础上补充量词和变量,使用字级建模语言[2]SMT求解器利用了SAT处理命题公式的高超效率,同时描述能力更强,抽象层次更高MLD-CBMC(Memory Leak Detecting - C Bounded Model Checker)。该方案以C/C++程序文件为输入,提出了针对不同内存泄漏类型的属性描述,利用可满足性模理论对程序和属性编码为验证条件,使用SMT求解器Z3对验证条件求解,以实现C程序内存泄漏的检测。通过与CMBC(C Bounded Model Checker) [3]、ESBMC[4]工具的对比实验,可以发现MLD-CMBC在检测内存泄漏时,检测能力和性能均有提升。 C程序内存泄漏问题及检测方案C程序内存泄露 一般嵌入式软

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档