skip to main content
research-article

Many-core compiler fuzzing

Published:03 June 2015Publication History
Skip Abstract Section

Abstract

We address the compiler correctness problem for many-core systems through novel applications of fuzz testing to OpenCL compilers. Focusing on two methods from prior work, random differential testing and testing via equivalence modulo inputs (EMI), we present several strategies for random generation of deterministic, communicating OpenCL kernels, and an injection mechanism that allows EMI testing to be applied to kernels that otherwise exhibit little or no dynamically-dead code. We use these methods to conduct a large, controlled testing campaign with respect to 21 OpenCL (device, compiler) configurations, covering a range of CPU, GPU, accelerator, FPGA and emulator implementations. Our study provides independent validation of claims in prior work related to the effectiveness of random differential testing and EMI testing, proposes novel methods for lifting these techniques to the many-core setting and reveals a significant number of OpenCL compiler bugs in commercial implementations.

References

  1. A. Aho, M. Lam, R. Sethi, and J. Ullman. Compilers: Principles, Techniques, & Tools. Pearson Education, 2nd edition, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. E. Bardsley, A. Betts, N. Chong, P. Collingbourne, P. Deligiannis, A. F. Donaldson, J. Ketema, D. Liew, and S. Qadeer. Engineering a static verification tool for GPU kernels. In CAV, pages 226–242, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Che, M. Boyer, J. Meng, D. Tarjan, J. W. Sheaffer, S. Lee, and K. Skadron. Rodinia: A benchmark suite for heterogeneous computing. In IISWC, pages 44–54, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Chen, T. Tse, and Z. Zhou. Fault-based testing without the need of oracles. Information and Software Technology, 45(1):1–9, 2003.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Y. Chen, A. Groce, C. Zhang, W. Wong, X. Fern, E. Eide, and J. Regehr. Taming compiler fuzzers. In PLDI, pages 197–208, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Chong, A. F. Donaldson, and J. Ketema. A sound and complete abstraction for reasoning about parallel prefix sums. In POPL, pages 397–410, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. Eide and J. Regehr. Volatiles are miscompiled, and what to do about it. In EMSOFT, pages 255–264, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Holler, K. Herzig, and A. Zeller. Fuzzing with code fragments. In USENIX Security Symposium, pages 445–458, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. ISO. ISO/IEC 9899:TC2: Programming Languages–C, 1999.Google ScholarGoogle Scholar
  10. Khronos. The OpenCL specification, versions 1.0, 1.1, 1.2 and 2.0, 2009–2014.Google ScholarGoogle Scholar
  11. Khronos. The OpenCL specification, version 1.2, 2012. Document revision 19.Google ScholarGoogle Scholar
  12. V. Le, M. Afshari, and Z. Su. Compiler validation via equivalence modulo inputs. In PLDI, 2014. Article 25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. W. M. McKeeman. Differential testing for software. Digital Technical Journal, 10(1):100–107, 1998.Google ScholarGoogle Scholar
  14. R. Morisset, P. Pawan, and F. Zappa Nardelli. Compiler testing via a theory of sound optimisations in the C11/C++11 memory model. In PLDI, pages 187–196, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Price and S. McIntosh-Smith. Oclgrind: An extensible OpenCL device simulator. In IWOCL, 2015. To appear.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Regehr, Y. Chen, P. Cuoq, E. Eide, C. Ellison, and X. Yang. Testcase reduction for C compiler bugs. In PLDI, pages 335–346, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. F. Sheridan. Practical testing of a C99 compiler using output comparison. Software — Practice and Experience, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. A. Stratton, C. Rodrigues, I. J. Sung, N. Obeid, L. W. Chang, N. Anssari, G. D. Liu, and W. W. Hwu. Parboil: A revised benchmark suite for scientific and commercial throughput computing. Technical Report IMPACT-12-01, UIUC, March 2012.Google ScholarGoogle Scholar
  19. Q. Tao, W. Wu, C. Zhao, and W. Shen. An automatic testing approach for compiler based on metamorphic testing technique. In APSEC, pages 270–279, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. X. Yang, Y. Chen, E. Eide, and J. Regehr. Finding and understanding bugs in C compilers. In PLDI, pages 283–294, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. C. Zhao, Y. Xue, Q. Tao, L. Guo, and Z. Wang. Automated test program generation for an industrial optimizing compiler. In AST, pages 36–43, 2009.Google ScholarGoogle Scholar

Index Terms

  1. Many-core compiler fuzzing

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 50, Issue 6
            PLDI '15
            June 2015
            630 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2813885
            • Editor:
            • Andy Gill
            Issue’s Table of Contents
            • cover image ACM Conferences
              PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation
              June 2015
              630 pages
              ISBN:9781450334686
              DOI:10.1145/2737924

            Copyright © 2015 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 3 June 2015

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!