Finding bugs is easy

Finding bugs is easy
复制标题

DOI:
10.1145/1052883.1052895
复制
发表时间:
2004-12
影响因子:
--
通讯作者:
David Hovemeyer;W. Pugh
David Hovemeyer;W. Pugh
中科院分区:
--
文献类型:
--
作者:
David Hovemeyer;W. Pugh

文献摘要

被引文献

相似文献

多年来,人们已经开发了许多技术来自动查找软件中的漏洞。通常,这些技术依赖于形式化方法和复杂的程序分析。虽然这些技术很有价值,但它们可能难以应用,而且在查找实际漏洞时并不总是有效。 漏洞模式是通常为错误的代码习惯用法。我们已经为在Java程序中发现的各种漏洞模式实现了自动检测器。在本文中,我们描述了我们如何使用漏洞模式检测器在几个广泛使用的Java应用程序和库中查找严重漏洞。我们发现实现一个漏洞模式检测器所需的工作量往往较低,而且即使是极其简单的检测器也能在实际应用中发现漏洞。 根据我们将漏洞模式检测器应用于实际程序的经验,我们得出了几个有趣的结论。首先,我们发现即使是由专家编写的经过良好测试的代码也包含数量惊人的明显漏洞。其次,Java(以及类似语言)有许多容易被误用的语言特性和应用程序编程接口。最后,简单的自动化技术可以有效地应对普通错误和对语言特性的误解所带来的影响。
Many techniques have been developed over the years to automatically find bugs in software. Often, these techniques rely on formal methods and sophisticated program analysis. While these techniques are valuable, they can be difficult to apply, and they aren't always effective in finding real bugs.Bug patterns are code idioms that are often errors. We have implemented automatic detectors for a variety of bug patterns found in Java programs. In this paper, we describe how we have used bug pattern detectors to find serious bugs in several widely used Java applications and libraries. We have found that the effort required to implement a bug pattern detector tends to be low, and that even extremely simple detectors find bugs in real applications.From our experience applying bug pattern detectors to real programs, we have drawn several interesting conclusions. First, we have found that even well tested code written by experts contains a surprising number of obvious bugs. Second, Java (and similar languages) have many language features and APIs which are prone to misuse. Finally, that simple automatic techniques can be effective at countering the impact of both ordinary mistakes and misunderstood language features.