EUVIMEDEUVIMED entdecken
Crossref

Fuzzing C++ Compilers via Type-Driven Mutation

Bo Wang, Chong Chen, Ming Deng, Junjie Chen, Xing Zhang, Youfang Lin, Dan Hao, Jun Sun

Proceedings of the ACM on Programming Languages · 09.10.2025 · 9 (OOPSLA2) · 1232-1260

DOI: 10.1145/3763094 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Programming Languages, online erschienen am 09.10.2025. Verfasst von Bo Wang und 7 weiteren Autor:innen. Die Arbeit wurde bisher 8-mal zitiert (Crossref) und nennt 73 Literaturangaben. Gefördert von: National Natural Science Foundation of China, Ministry of Education, Singapore, under its Academic Research Fund Tier 2.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

C++ is a system-level programming language for modern software development, which supports multiple programming paradigms, including object-oriented, generic, and functional programming. The intrinsic complexity of these paradigms and their interactions grants C++ powerful expressiveness while posing significant challenges for compilers in correctly implementing its type system. A type system encompasses various aspects such as type inference, type checking, subtyping, type conversions, generics, scoping, and binding. However, systematic testing of the type systems of C++ compilers remains largely underexplored in existing studies. In this work, we present TyMut, the first approach specifically designed to test the C++ type system. TyMut is a mutation-based compiler fuzzer equipped with advanced type-driven mutation operators, carefully crafted to target intricate type-related features such as template generics, type conversions, and inheritance. Beyond differential testing, TyMut introduces enhanced test oracles through a must analysis that partially confirms the validity of generated programs. Specifically, mutation operators are classified into well-formed and not-well-formed : Programs generated by well-formed mutation operators are valid and must be accepted by compilers. Programs generated by not-well-formed operators are validated against a set of well-formedness rules . Any violation indicates the program is invalid and must be rejected. For programs that pass the rules but lack a definitive oracle, TyMut applies differential testing to identify behavioral inconsistencies across compilers. The testing campaign took about 32 hours to generate and test 250584 programs. The must analysis provides definite test oracles for nearly 80% of all generated programs. TyMut uncovered 102 bugs in the recent versions of GCC and Clang, with 56 confirmed as new bugs by compiler developers. Among the confirmed bugs, 26 of them cause compiler crashes, and more than 50% cause miscompilation. Additionally, 7 of them had remained hidden for over 20 years, 22 for over 10 years, and 39 for over 5 years. One long-standing bug discovered by TyMut was later confirmed as the root cause of a real-world issue in TensorFlow. Before submitting this paper, 13 bugs were fixed, most of which were fixed within 60 days. Notably, some unconfirmed bugs have led to in-depth discussions among developers. For instance, one bug led a compiler developer to submit a new issue to the C++ language standard, showing that we uncovered ambiguities in the language specification.

Förderung

  • National Natural Science Foundation of China
  • Ministry of Education, Singapore, under its Academic Research Fund Tier 2

Zitieren

APA

Wang, B., Chen, C., Deng, M., Chen, J., Zhang, X., Lin, Y., Hao, D., & Sun, J. (2025). Fuzzing C++ Compilers via Type-Driven Mutation. Proceedings of the ACM on Programming Languages, 9(OOPSLA2), 1232-1260. https://doi.org/10.1145/3763094

Vancouver

Wang B, Chen C, Deng M, Chen J, Zhang X, Lin Y, et al. Fuzzing C++ Compilers via Type-Driven Mutation. Proceedings of the ACM on Programming Languages. 2025;9(OOPSLA2):1232-1260. doi:10.1145/3763094

BibTeX
@article{Wang2025,
  author = {Wang, Bo and Chen, Chong and Deng, Ming and Chen, Junjie and Zhang, Xing and Lin, Youfang and Hao, Dan and Sun, Jun},
  title = {Fuzzing C++ Compilers via Type-Driven Mutation},
  journal = {Proceedings of the ACM on Programming Languages},
  year = {2025},
  volume = {9},
  number = {OOPSLA2},
  pages = {1232--1260},
  doi = {10.1145/3763094}
}
Kostenlos starten →