首页> 外文OA文献 >Accelerating Dynamic Detection of Memory Errors for C Programs via Static Analysis
【2h】

Accelerating Dynamic Detection of Memory Errors for C Programs via Static Analysis

机译:通过静态分析加速对C程序的内存错误的动态检测

摘要

Memory errors in C programs are the root causes of many defects and vulnerabilitiesin software engineering. Among the available error detection techniques,dynamic analysis is widely used in industries due to its high precision. Unfortunately,existing approaches su↵er from considerable runtime overheads, owing tounguided and overly conservative instrumentation. With the massive growth ofsoftware nowadays, such inefficiency prevents testing with comprehensive programinputs, leaving some input-specific memory errors undetected.This thesis presents novel techniques to address the efficiency problem by eliminatingsome unnecessary instrumentation guided by static analysis. Targeting twomajor types of memory errors, the research has developed two tools, Usher andWPBound, both implemented in the LLVM compiler infrastructure, to acceleratethe dynamic detection.To facilitate efficient detection of undefined value uses, Usher infers the definednessof values using a value-flow graph that captures def-use information forboth top-level and address-taken variables interprocedurally, and removes unnecessaryinstrumentation by solving a graph reachability problem. Usher works wellwith any pointer analysis (done a priori) and enables advanced instrumentationreducingoptimizations.For efficient detection of spatial errors (e.g., bu↵er overflows), WPBound enhances the performance by reducing unnecessary bounds checks. The basic ideais to guard a bounds check at a memory access inside a loop, where the guard iscomputed outside the loop based on the notion of weakest precondition. The falsehoodof the guard implies the absence of out-of-bounds errors at the dereference,thereby avoiding the corresponding bounds check inside the loop.For each tool, this thesis presents the methodology and evaluates the implementationwith a set of C benchmarks. Their e↵ectiveness is demonstrated withsignificant speedups over the state-of-the-art tools.
机译:C程序中的内存错误是软件工程中许多缺陷和漏洞的根本原因。在可用的错误检测技术中,动态分析由于其高精度而被广泛应用于工业中。不幸的是,由于未受指导的仪器和过于保守的仪器,现有的方法会产生大量的运行时开销。随着当今软件的大量增长,这种低效率阻止了使用全面的程序输入进行测试,从而遗漏了一些特定于输入的内存错误。本文提出了一种新颖的技术,通过消除静态分析指导下的一些不必要的仪器来解决效率问题。针对两种主要的内存错误,研究人员开发了两种工具(Usher和WPBound),它们均在LLVM编译器基础结构中实现,以加快动态检测的速度。为了促进对未定义值使用的有效检测,Usher使用值流图推断值的定义性可以跨过程地捕获顶级变量和地址获取变量的定义使用信息,并通过解决图形可及性问题来消除不必要的仪器。 Usher可以与任何指针分析(先验地进行)一起很好地工作,并且可以实现减少高级优化的先进仪器。为了有效检测空间错误(例如,缓冲区溢出),WPBound通过减少不必要的边界检查来增强性能。基本思想是在循环内部的内存访问中保护边界检查,其中根据最弱前提条件的概念在循环外部计算保护。守卫的虚假性意味着在取消引用时不存在越界错误,从而避免了在循环内进行相应的边界检查。本文针对每种工具,介绍了方法,并使用一组C基准对实现进行了评估。与最先进的工具相比,它们的效率得到了显着提高。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号