Bugs as deviant behavior

Author:

Engler Dawson1,Chen David Yu1,Hallem Seth1,Chou Andy1,Chelf Benjamin1

Affiliation:

1. Stanford University, Stanford, CA

Abstract

A major obstacle to finding program errors in a real system is knowing what correctness rules the system must obey. These rules are often undocumented or specified in an ad hoc manner. This paper demonstrates techniques that automatically extract such checking information from the source code itself, rather than the programmer, thereby avoiding the need for a priori knowledge of system rules.The cornerstone of our approach is inferring programmer "beliefs" that we then cross-check for contradictions. Beliefs are facts implied by code: a dereference of a pointer, p, implies a belief that p is non-null, a call to "unlock(1)" implies that 1 was locked, etc. For beliefs we know the programmer must hold, such as the pointer dereference above, we immediately flag contradictions as errors. For beliefs that the programmer may hold, we can assume these beliefs hold and use a statistical analysis to rank the resulting errors from most to least likely. For example, a call to "spin_lock" followed once by a call to "spin_unlock" implies that the programmer may have paired these calls by coincidence. If the pairing happens 999 out of 1000 times, though, then it is probably a valid belief and the sole deviation a probable error. The key feature of this approach is that it requires no a priori knowledge of truth: if two beliefs contradict, we know that one is an error without knowing what the correct belief is .Conceptually, our checkers extract beliefs by tailoring rule "templates" to a system --- for example, finding all functions that fit the rule template " a must be paired with b ." We have developed six checkers that follow this conceptual framework. They find hundreds of bugs in real systems such as Linux and OpenBSD. From our experience, they give a dramatic reduction in the manual effort needed to check a large system. Compared to our previous work [9], these template checkers find ten to one hundred times more rule instances and derive properties we found impractical to specify manually.

Publisher

Association for Computing Machinery (ACM)

Reference23 articles.

1. M. Bishop and M. Dilger. Checking for race conditions in file accesses. Computing systems pages 131-152 Spring 1996.]] M. Bishop and M. Dilger. Checking for race conditions in file accesses. Computing systems pages 131-152 Spring 1996.]]

2. Bandera

Cited by 201 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Fuzzing API Error Handling Behaviors using Coverage Guided Fault Injection;Proceedings of the 19th ACM Asia Conference on Computer and Communications Security;2024-07

2. Automatic Repair of Quantum Programs via Unitary Operation;ACM Transactions on Software Engineering and Methodology;2024-06-28

3. DSHGT : Dual-Supervisors Heterogeneous Graph Transformer - A pioneer study of using heterogeneous graph learning for detecting software vulnerabilities;ACM Transactions on Software Engineering and Methodology;2024-06-28

4. Diffy: Data-Driven Bug Finding for Configurations;Proceedings of the ACM on Programming Languages;2024-06-20

5. ValBench: Benchmarking Exact Value Analysis;Proceedings of the 13th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis;2024-06-20

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3