Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
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)Bloat beneath Python’s Scales: A Fine-Grained Inter-Project Dependency AnalysisProceedings of the ACM on Software Engineering10.1145/36608211:FSE(2584-2607)Online publication date: 12-Jul-2024
  • (2024)Finding Cross-Rule Optimization Bugs in Datalog EnginesProceedings of the ACM on Programming Languages10.1145/36498158:OOPSLA1(110-136)Online publication date: 29-Apr-2024
  • (2024)A Survey of Software Dynamic Analysis MethodsProgramming and Computing Software10.1134/S036176882401007950:1(90-114)Online publication date: 1-Feb-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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
  • 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
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2012
Published in SIGPLAN Volume 47, Issue 6

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

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)117
  • Downloads (Last 6 weeks)7
Reflects downloads up to 03 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Bloat beneath Python’s Scales: A Fine-Grained Inter-Project Dependency AnalysisProceedings of the ACM on Software Engineering10.1145/36608211:FSE(2584-2607)Online publication date: 12-Jul-2024
  • (2024)Finding Cross-Rule Optimization Bugs in Datalog EnginesProceedings of the ACM on Programming Languages10.1145/36498158:OOPSLA1(110-136)Online publication date: 29-Apr-2024
  • (2024)A Survey of Software Dynamic Analysis MethodsProgramming and Computing Software10.1134/S036176882401007950:1(90-114)Online publication date: 1-Feb-2024
  • (2024)Mopsa-C: Improved Verification for C Programs, Simple Validation of Correctness Witnesses (Competition Contribution)Tools and Algorithms for the Construction and Analysis of Systems10.1007/978-3-031-57256-2_26(387-392)Online publication date: 5-Apr-2024
  • (2024)SoK: A Tale of Reduction, Security, and Correctness - Evaluating Program Debloating Paradigms and Their CompositionsComputer Security – ESORICS 202310.1007/978-3-031-51482-1_12(229-249)Online publication date: 11-Jan-2024
  • (2023)Fuzzing Loop Optimizations in Compilers for C++ and Data-Parallel LanguagesProceedings of the ACM on Programming Languages10.1145/35912957:PLDI(1826-1847)Online publication date: 6-Jun-2023
  • (2022)XDebloat: Towards Automated Feature-Oriented App DebloatingIEEE Transactions on Software Engineering10.1109/TSE.2021.312021348:11(4501-4520)Online publication date: 1-Nov-2022
  • (2021)Generative type-aware mutation for testing SMT solversProceedings of the ACM on Programming Languages10.1145/34855295:OOPSLA(1-19)Online publication date: 15-Oct-2021
  • (2021)Well-typed programs can go wrong: a study of typing-related bugs in JVM compilersProceedings of the ACM on Programming Languages10.1145/34855005:OOPSLA(1-30)Online publication date: 15-Oct-2021
  • (2021)Confuzzion: A Java Virtual Machine Fuzzer for Type Confusion Vulnerabilities2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00069(586-597)Online publication date: Dec-2021
  • 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

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media