Proceedings of the Conference on Programming Language Design and Implementation Year 2022 Peer-reviewed
Programming Languages · Static Analysis

Finding Typing Compiler Bugs

Stefanos Chaliasos Thodoris Sotiropoulos Diomidis Spinellis Benjamin Livshits Dimitris Mitropoulos
Peer-reviewed
Type
PLDI
Venue
2022
Publication year

Problem

We propose a testing framework for validating static typing procedures in compilers. Our core component is a program generator suitably crafted for producing programs that are likely to trigger typing compiler bugs. One of our main contributions is that our program generator gives rise to transformation-based compiler testing for finding typing bugs.

Approach

We present two novel approaches (type erasure mutation and type overwriting mutation) that apply targeted transformations to an input program to reveal type inference and soundness compiler bugs respectively. Both approaches are guided by an intra-procedural type inference analysis used to capture type information flow. We implement our techniques as a tool, which we call Hephaestus.

Results

The extensibility of Hephaestus enables us to test the compilers of three popular JVM languages: Java, Kotlin, and Groovy. Within nine months of testing, we have found 156 bugs (137 confirmed and 85 fixed) with diverse manifestations and root causes in all the examined compilers. Most of the discovered bugs lie in the heart of many critical components related to static typing, such as type inference.

Cite this paper — BibTeX
@InProceedings{finding-pldi22,
  author = {Stefanos Chaliasos and Thodoris Sotiropoulos and Diomidis Spinellis and Benjamin Livshits and Dimitris Mitropoulos},
  title = {Finding Typing Compiler Bugs},
  booktitle = Proceedings of the Conference on Programming Language Design and Implementation},
  month =  jun,
  year = 2022,
}
Copied