Weak Memory Demands Model-based Compiler Testing
Luke Geeson

TL;DR
This paper emphasizes the importance of model-based compiler testing to detect bugs caused by relaxed memory models in modern hardware, highlighting the need for updated testing tools and methodologies.
Contribution
It introduces a framework for model-based compiler testing that accounts for relaxed memory models, demonstrated through a reported bug in LLVM.
Findings
Compiler bugs can arise from relaxed memory models not covered by traditional testing.
Existing testing tools need updates to handle hardware relaxations.
A specific bug in LLVM was identified using the proposed testing approach.
Abstract
A compiler bug arises if the behaviour of a compiled concurrent program, as allowed by its architecture memory model, is not a behaviour permitted by the source program under its source model. One might reasonably think that most compiler bugs have been found in the decade since the introduction of the C/C++ memory model. We observe that processor implementations are increasingly exploiting the behaviour of relaxed architecture models. As such, compiled programs may exhibit bugs not seen on older hardware. To account for this we require model-based compiler testing. While this observation is not surprising, its implications are broad. Compilers and their testing tools will need to be updated to follow hardware relaxations, concurrent test generators will need to be improved, and assumptions of prior work will need revisiting. We explore these ideas using a compiler toolchain bug we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software System Performance and Reliability · Advanced Software Engineering Methodologies
