首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到17条相似文献,搜索用时 156 毫秒
1.
一种混合式内存泄漏静态检测方法   总被引:1,自引:0,他引:1  
内存泄漏是导致系统性能降低的重要问题.提出一种基于模型检测算法的内存泄漏静态检查方法TMC.该方法依据程序的控制流图构建对应于程序执行的有限状态自动机,进而在此基础上应用模型检测算法分析程序中可能存在的内存泄漏.论文利用几个典型的程序实例详细说明了TMC的工作原理,并通过基于内存操作密集的测试程序集PtrDist的实验对TMC进行了验证.实验结果表明,TMC能够显著提升内存泄漏分析的精度.  相似文献   

2.
C++是一种非常流行的计算机编程语言,在使用的过程中容易出现内存泄漏问题,而该问题往往难以识别。给出了一种对C++内存泄漏问题进行分析的方法,该方法得到C++源代码的抽象语法树,从抽象语法树中提取程序控制流图,然后将类的构造函数、普通成员函数以及析构函数的程序控制流图相互连接形成新的程序控制流图,并设计算法对控制流图进行检测。最后通过一些内存泄漏的典型实例进行测试,实验表明本方法有效。  相似文献   

3.
基于指针分析的内存泄露故障测试方法研究*   总被引:2,自引:1,他引:1  
提出了一种新的指针分析方法,通过静态分析程序中指针的映射关系来检测内存泄漏故障;给出了指针映射代数系统的概念,在此基础上分析了如何构造指针映射集,并详细叙述了测试步骤;最后通过实例分析了该方法的应用效果,讨论了需要进一步解决的问题。该方法还考虑了控制流图和路径条件,提高了测试结果的精度。  相似文献   

4.
基于路径跟踪的控制流检测   总被引:1,自引:0,他引:1       下载免费PDF全文
硬件瞬时故障可以通过修改指令操作码和操作数的方式引发控制流错误,破坏程序的正常执行。针对硬件瞬时故障引起的程序控制流错误,提出一种指令级控制流检测方法,对程序执行路径进行跟踪。故障注入实验结果表明,该方法的平均错误检测率、增加的内存消耗和性能损耗分别为97.8%, 83.2%和52.9%。  相似文献   

5.
空间辐射环境中,大量的宇宙射线经常导致星载计算机出现瞬时故障,这些故障的主要影响之一是引发程序控制流错误.文中提出了一种软件实现的控制流检测方法CFCAF.CFCAF基于插入虚拟基本块后的控制流图对基本块分类,并为基本块设计格式化标签,然后在基本块内插装标签更新、比较指令,实现对基本块之间、基本块内和过程间调用的控制流检测.CFCAF的特点是可以根据可靠性和性能的需求进行灵活配置.对CFCAF及目前有代表性的两个同类算法进行的故障注入实验结果表明,CFCAF算法以平均41.7%的性能代价和平均34%的空间代价,使程序的平均失效率降到了5.2%,在3个同类算法中,CFCAF算法具有较低的时空开销和最高的可靠性.  相似文献   

6.
一种基于格式化标签的可扩展控制流检测方法   总被引:1,自引:0,他引:1  
硬件瞬态故障是运行于高辐照宇宙环境下的航天计算机面临的最主要挑战之一.其中,控制流错误是这种故障影响系统可靠性的重要体现.首先在程序控制流图的基础上,利用图着色算法对基本块进行分类,然后基于基本块的格式化标签提出一种有效的控制流检测方法ECCFS,并针对基本块内部和过程间两个控制流检测问题分别给出其扩展解决方法.检测效能分析和故障注入实验的结果都表明,除了伪分支和几个边界检测盲点之外,ECCFS能够检测出绝大部分的控制流错误.与两个有代表性的控制流检测方法相比较,ECCFS在错误检测率和性能开销等方面都具有一定的优势.  相似文献   

7.
基于指针映射集的动态内存故障测试方法研究   总被引:2,自引:0,他引:2  
动态内存故障在使用指针的程序中是普遍存在的,采用动态测试方法进行测试难以准确定位故障源.而现有的静态分析方法主要存在漏报和误报过多的情况.针对这些问题,提出了指针映射代数系统的概念,全面地反映了指针与内存之间的映射关系,并给出了面向不同故障的指针映射集的构造规则,以此为基础建立了动态内存故障模型.通过指针映射集和故障模型,可以自动检测内存释放异常、内存泄露和空指针引用等动态内存故障,提高了测试效率.在分析过程中,还综合应用了控制流图和路径条件,提高了测试结果的精度.实验结果表明,该方法能够有效检测动态内存故障,而且出于规则定义较为全面,漏报和误报率也较低.  相似文献   

8.
控制流图描述了函数执行时可能采取的执行路径。绝大多数静态分析工具都在抽象语法树之上生成控制流图并据此对程序的运行行为进行分析。在模型检测过程中,提取正确的控制流图是构建系统模型的关键。在分析C程序的抽象语法树和控制结构的基础上,设计并实现了程序控制流图提取的算法,并分析了算法的正确性。基于提取的控制流程,可对C程序的某些性质进行模型检验。  相似文献   

9.
针对基于PHP语言开发的Web应用程序产生的污点型漏洞,提出一种静态代码分析检测的方法。提出的生成控制流图的算法,基于PHP内置函数解析PHP程序,生成抽象解析树,进而生成控制流图;对内置特征、入口点和敏感点进行建模,精确分析数据流;提出基于有效路径的污点分析方法,提高了分析的准确性,实现了基于变量回溯的路径遍历算法。实现了该方法的原型系统,并对两个广泛使用的PHP应用程序进行测试,发现了6个未公开漏洞和11个已公开漏洞,证明了该系统具有较强的漏洞检测能力。  相似文献   

10.
为轻松获得程序的可能执行路径,进而实现程序变量的状态跟踪,提出了一种C/C++源代码控制流提取算法,通过该模型获取控制流切片,产生局部控制流图,将数据流异常检测与安全子集检测相结合,弥补了单独使用安全子集方法无法跟踪数据流的不足,增强代码安全隐患的挖掘能力.利用控制流图化简,排除部分不可达控制流信息,提高跟踪效率.通过对3个Linux内核源文件的检测,验证了该方法不仅可以检测出违反安全子集的代码安全隐患,同时对代码数据流异常检测提供支持,准确率达94.9%.  相似文献   

11.
针对现有的内存相关漏洞检测方法中存在依赖指针数据流而导致大量误报漏报、缺乏漏洞特征的形式化描述以及漏洞特征描述不全面的问题,提出一种基于抽象内存模型的内存相关漏洞检测方法.对抽象内存模型进行相关定义;基于抽象内存模型,对内存泄露、重复释放内存和读写释放后的内存这三种与内存相关的漏洞类型的特征进行形式化符号表示;基于代码...  相似文献   

12.
C程序内存泄漏智能化检测方法   总被引:1,自引:1,他引:0  
内存泄漏在采用显式内存管理机制的C语言中是一种常见的代码缺陷,内存泄漏的检测方法目前主要是静态分析与动态检测.动态检测开销大,且高度依赖测试用例;静态分析目前被学术界和工业界广泛应用,但是存在大量误报,需要人工对检测结果进行确认.内存泄漏静态分析的误报通常是由于对指针、分支语句和全局变量分析的不准确性导致的.提出了一种内存泄漏的智能化检测方法,通过使用机器学习算法学习程序特征与内存泄漏之间的相关性,构建机器学习分类器,并应用机器学习分类器进一步提高内存泄漏静态分析的准确性.首先构建机器学习分类器,然后通过静态分析方法构建从内存分配点开始的Sparse Value Flow Graph(SVFG),并从中提取内存泄漏相关特征,再使用规则和机器学习分类器进行内存泄漏的检测.实验结果显示,该方法在分析指针、分支语句和全局变量时是有效的,能够提高内存泄漏检测的准确性,降低内存泄漏检测结果的误报.最后,对未来研究的可行性以及面临的挑战进行了展望.  相似文献   

13.
Memory leaks are a common type of defect that is hard to detect manually. Existing memory leak detection tools suffer from lack of precise interprocedural analysis and path-sensitivity. To address this problem, we present a static interprocedural analysis algorithm, that performs fully pathsensitive analysis and captures precise function behaviors, to detect memory leak in C programs. The proposed algorithm uses path-sensitive symbolic execution to track memory actions in different program paths guarded by path conditions. A novel analysis model called memory state transition graph (MSTG) is proposed to describe the tracking process and its results. In order to do interprocedural analysis, the proposed algorithm generates a summary for each procedure from MSTG and applies the summary at the procedure’s call sites. A prototype tool called Melton is implemented for this procedure. Melton was applied to five open source C programs and 41 leaks were found. More than 90% of these leaks were subsequently confirmed and fixed by their maintainers. For comparison with other tools, Melton was also applied to some programs in standard performance evaluation corporation (SPEC) CPU 2000 benchmark suite and detected more leaks than the state of the art approaches.  相似文献   

14.
As the number of available multiprocessors increases, so does the importance of providing software support for these systems, including parallel compilers. Data flow analysis, an important component of software tools, may be computed many times during the compilation of a program, especially when compiling for a multiprocessor. Although converting a sequential data flow algorithm to a parallel algorithm can present some opportunities for computing data flow in parallel, more parallelism can be exposed by the development of new parallel data flow algorithms. We present a technique that computes rapid data flow problems in parallel and thus is applicable for commonly used classical data flow problems, including reaching definitions, reachable uses, available expressions, and very busy expressions. Unlike previous techniques, our technique exploits the inherent parallelism in the data flow computation that occurs across independent paths, within linear paths, and in paths through loops of a control flow graph. The technique first changes cyclic structures in a control flow graph to acyclic structures and then builds a combining directed acyclic graph (DAG) that represents the paths through the control flow graph needed to compute data flow. Data flow is then computed using two passes over the DAG by computing the data flow for the nodes on each level of the DAG in parallel. We also present experimental results comparing the performance of our algorithm with a sequential algorithm and a parallelized sequential algorithm  相似文献   

15.
王淑栋  尹文静  董玉坤  张莉  刘浩 《软件学报》2020,31(5):1276-1293
C程序中数组、malloc动态分配后的连续内存等顺序存储结构被大量使用,但大多数传统的数据流分析方法未能充分描述其结构及其上的操作,特别是在利用指针访问顺序存储结构时,传统的分析方法只关注了指针的指向关系,而未讨论指针可能发生偏移的数值信息,且未考虑发生偏移时可能存在越界的不安全问题,导致了对顺序存储结构分析不精确.针对以上不足,首先对顺序存储结构进行抽象建模,并对顺序存储结构与指针结合使用时的指向关系与偏移量进行有效表示,建立了用于顺序存储结构的抽象内存模型SeqMM;其次,归纳总结C程序中顺序存储结构涉及的指针相关迁移操作、谓词操作及遍历顺序存储结构的循环操作,提出了安全范围判别保证操作安全性;之后,针对函数调用时形参指针引用顺序存储结构与实参的映射过程进行过程间推导规则设计;最后,基于上述分析,提出了一种内存泄漏缺陷检测算法对5个开源C工程的内存泄漏缺陷进行检测.实验结果表明:所提出的SeqMM能够有效地刻画C程序中的顺序存储结构及其涉及的各种操作,其数据流分析结果能够用于内存泄漏的检测工作,同时在效率和精度之间取得合理的权衡.  相似文献   

16.
Despite the correct deployment of access control mechanisms, information leaks can persist and threaten the reliability of business process execution. This paper presents an automated and effective approach for the verification of information flow control for business process models. Building on the concept of place-based non-interference and declassification, the core contribution of this paper is the application of Petri net reachability to detect places in which information leaks occur. Such a feature allows for the use of state-of-the-art tool support to model-check business process models and detect leaks. We show that the approach is sound and complete, and present the Anica tool to identify leaks. An extensive evaluation comprising over 550 industrial process models is carried out and shows that information flow analysis of process models can be done in milliseconds. This motivates a tight integration of business process modeling and non-interference checking.  相似文献   

17.
Memory leaks are usually not associated with runtime environments with automatic garbage collection; however, memory leaks do happen in such environments and present a challenge to detect and find a root cause. Currently in the industry manual heap dump analysis is the most popular way of finding memory leaks, regardless of the number of automated methods proposed by scientists over the years. However, heap dump analysis alone cannot answer all questions needed to fix the leak effectively. The current paper reviews memory leak detection approaches proposed over the years and classifies them from the point of view of assessed metrics, performance overhead and intrusiveness. In addition, we classify the methods into online, offline and hybrid groups based on their features.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号