Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/2254064.2254104acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Test-case reduction for C compiler bugs

Published: 11 June 2012 Publication History

Abstract

To report a compiler bug, one must often find a small test case that triggers the bug. The existing approach to automated test-case reduction, delta debugging, works by removing substrings of the original input; the result is a concatenation of substrings that delta cannot remove. We have found this approach less than ideal for reducing C programs because it typically yields test cases that are too large or even invalid (relying on undefined behavior). To obtain small and valid test cases consistently, we designed and implemented three new, domain-specific test-case reducers. The best of these is based on a novel framework in which a generic fixpoint computation invokes modular transformations that perform reduction operations. This reducer produces outputs that are, on average, more than 25 times smaller than those produced by our other reducers or by the existing reducer that is most commonly used by compiler developers. We conclude that effective program reduction requires more than straightforward delta debugging.

References

[1]
Bruno Blanchet, Patrick Cousot, Radhia Cousot, Jérôme Feret, Laurent Mauborgne, Antoine Miné, David Monniaux, and Xavier Rival. A static analyzer for large safety-critical software. In Proc. of the ACM SIGPLAN 2003 Conf. on Programming Language Design and Implementation (PLDI), pages 196--207, San Diego, CA, June 2003.
[2]
Géraud Canet, Pascal Cuoq, and Benjamin Monate. A value analysis for C programs. In Proc. of the 9th IEEE Intl. Working Conf. on Source Code Analysis and Manipulation, pages 123--124, Edmonton, Alberta, Canada, September 2009.
[3]
Jacqueline M. Caron and Peter A. Darnell. Bugfind: A tool for debugging optimizing compilers. SIGPLAN Notices, 25(1):17--22, January 1990.
[4]
Pascal Cuoq, Benjamin Monate, Anne Pacalet, Virgile Prevosto, John Regehr, Boris Yakobowski, and Xuejun Yang. Testing static analyzers with randomly generated programs. In Proc. of the 4th NASA Formal Methods Symposium (NFM 2012), Norfolk, VA, April 2012.
[5]
Pascal Cuoq, Julien Signoles, Patrick Baudin, Richard Bonichon, Géraud Canet, Loıc Correnson, Benjamin Monate, Virgile Prevosto, and Armand Puccetti. Experience report: OCaml for an industrial-strength static analysis framework. In Proc. of the 14th ACM SIGPLAN Intl. Conf. on Functional Programming (ICFP), pages 281--286, Edinburgh, Scotland, 2009.
[6]
Chucky Ellison and Grigore Roşu. An executable formal semantics of C with applications. In Proc. of the 39th Symp. on Principles of Programming Languages (POPL), pages 533--544, Philadelphia, PA, January 2012.
[7]
International Organization for Standardization. ISO/IEC 9899:TC3: Programming Languages-C, 2007. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf.
[8]
Rajeev Joshi, Greg Nelson, and Yunhong Zhou. Denali: A practical algorithm for generating optimal code. ACM Transactions on Programming Languages and Systems, 28(6):967--989, November 2006.
[9]
Andreas Leitner, Manuel Oriol, Andreas Zeller, Ilinca Ciupa, and Bertrand Meyer. Efficient unit test case minimization. In Proc. of the 22nd Intl. Conf. on Automated Software Engineering (ASE), pages 417--420, Atlanta, GA, November 2007.
[10]
MathWorks. Polyspace server 8.1 for C/C, product brochure, 2010. http://www.mathworks.com/products/datasheets/pdf/polyspace-server-for-c-c.pdf.
[11]
William M. McKeeman. Differential testing for software. Digital Technical Journal, 10(1):100--107, December 1998.
[12]
Scott McPeak and Daniel S. Wilkerson. Delta, 2003. http://delta.tigris.org/.
[13]
Ghassan Misherghi and Zhendong Su. HDD: Hierarchical delta debugging. In Proc. of the 28th Intl. Conf. on Software Engineering (ICSE), pages 142--151, Shanghai, China, May 2006.
[14]
James W. Moore. ISO/IEC JTC 1/SC 22/WG 23: Programming language vulnerabilities. http://grouper.ieee.org/groups/plv/.
[15]
David B. Whalley. Automatic isolation of compiler errors. ACM Transactions on Programming Languages and Systems, 16(5):1648--1659, September 1994.
[16]
Brian White, Jay Lepreau, Leigh Stoller, Robert Ricci, Shashi Guruprasad, Mac Newbold, Mike Hibler, Chad Barb, and Abhijeet Joglekar. An integrated experimental environment for distributed systems and networks. In Proc. of the 5th Symp. on Operating Systems Design and Implementation (OSDI), pages 255--270, Boston, MA, December 2002.
[17]
Xuejun Yang, Yang Chen, Eric Eide, and John Regehr. Finding and understanding bugs in C compilers. In Proc. of the ACM SIGPLAN 2011 Conf. on Programming Language Design and Implementation (PLDI), pages 283--294, San Jose, CA, June 2011.
[18]
Andreas Zeller and Ralf Hildebrandt. Simplifying and isolating failure-inducing input. IEEE Transactions on Software Engineering, 28(2):183--200, February 2002.

Cited By

View all
  • (2024)Early Bug Detection through Shift Left TestingInternational Journal of Innovative Science and Research Technology (IJISRT)10.38124/ijisrt/IJISRT24NOV177(185-190)Online publication date: 18-Nov-2024
  • (2024)Shoot Yourself in the Foot — Efficient Code Causes Inefficiency in Compiler OptimizationsProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695548(1846-1857)Online publication date: 27-Oct-2024
  • (2024)Compiler Bug Isolation via Enhanced Test Program MutationProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695074(819-830)Online publication date: 27-Oct-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '12: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2012
572 pages
ISBN:9781450312059
DOI:10.1145/2254064
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 47, Issue 6
    PLDI '12
    June 2012
    534 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2345156
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. automated testing
  2. bug reporting
  3. compiler defect
  4. compiler testing
  5. random testing
  6. test-case minimization

Qualifiers

  • Research-article

Conference

PLDI '12
Sponsor:

Acceptance Rates

PLDI '12 Paper Acceptance Rate 48 of 255 submissions, 19%;
Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)141
  • Downloads (Last 6 weeks)18
Reflects downloads up to 18 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Early Bug Detection through Shift Left TestingInternational Journal of Innovative Science and Research Technology (IJISRT)10.38124/ijisrt/IJISRT24NOV177(185-190)Online publication date: 18-Nov-2024
  • (2024)Shoot Yourself in the Foot — Efficient Code Causes Inefficiency in Compiler OptimizationsProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695548(1846-1857)Online publication date: 27-Oct-2024
  • (2024)Compiler Bug Isolation via Enhanced Test Program MutationProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695074(819-830)Online publication date: 27-Oct-2024
  • (2024)SoK: Software Debloating Landscape and Future DirectionsProceedings of the 2024 Workshop on Forming an Ecosystem Around Software Transformation10.1145/3689937.3695792(11-18)Online publication date: 14-Oct-2024
  • (2024)Rustlantis: Randomized Differential Testing of the Rust CompilerProceedings of the ACM on Programming Languages10.1145/36897808:OOPSLA2(1955-1981)Online publication date: 8-Oct-2024
  • (2024)SMT2Test: From SMT Formulas to Effective Test CasesProceedings of the ACM on Programming Languages10.1145/36897198:OOPSLA2(222-245)Online publication date: 8-Oct-2024
  • (2024)Automated Feature Testing of Verilog Parsers using Fuzzing (Registered Report)Proceedings of the 3rd ACM International Fuzzing Workshop10.1145/3678722.3685536(70-79)Online publication date: 13-Sep-2024
  • (2024)Detecting Optimizing Compiler Bugs via History-Driven Test Program MutationProceedings of the 15th Asia-Pacific Symposium on Internetware10.1145/3671016.3671387(145-154)Online publication date: 24-Jul-2024
  • (2024)Finding and Understanding Defects in Static Analyzers by Constructing Automated OraclesProceedings of the ACM on Software Engineering10.1145/36607811:FSE(1656-1678)Online publication date: 12-Jul-2024
  • (2024)Refined Input, Degraded Output: The Counterintuitive World of Compiler BehaviorProceedings of the ACM on Programming Languages10.1145/36564048:PLDI(671-691)Online publication date: 20-Jun-2024
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media