Compiler Testing with Relaxed Memory Models

被引:0
作者
Geeson, Luke [1 ]
Smith, Lee [2 ]
机构
[1] UCL, London, England
[2] Arm Ltd, Cambridge, England
来源
2024 IEEE/ACM INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, CGO | 2024年
基金
英国工程与自然科学研究理事会;
关键词
D.1.3 Concurrent Programming; B.1.2.b Formal models; B.1.4.b Languages and compilers; D.2.5.r Testing tools; OPTIMIZATIONS; CONSISTENCY; C-11;
D O I
10.1109/CGO57630.2024.10444836
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Finding bugs is key to the correctness of compilers in wide use today. If the behaviour of a compiled program, as allowed by its architecture memory model, is not a behaviour of the source program under its source model, then there is a bug. This holds for all programs, but we focus on concurrency bugs that occur only with two or more threads of execution. We focus on testing techniques that detect such bugs in C/C++ compilers. We seek a testing technique that automatically covers concurrency bugs up to fixed bounds on program sizes and that scales to find bugs in compiled programs with many lines of code. Otherwise, a testing technique can miss bugs. Unfortunately, the state-of-the-art techniques are yet to satisfy all of these properties. We present the Telechat compiler testing tool for concurrent programs. Telechat compiles a concurrent C/C++ program and compares source and compiled program behaviours using source and architecture memory models. We make three claims: Tel echat improves the state-of-the-art at finding bugs in code generation for multi-threaded execution, it is the first public description of a compiler testing tool for concurrency that is deployed in industry, and it is the first tool that takes a significant step towards the desired properties. We provide experimental evidence suggesting Telechat finds bugs missed by other state-of-the-art techniques, case studies indicating that Telechat satisfies the properties, and reports of our experience deploying Telechat in industry regression testing.
引用
收藏
页码:334 / 348
页数:15
相关论文
共 77 条
[1]  
ALGLAVE J., 2022, ARM memory model
[2]  
ALGLAVE J., 2021, NEON Architecture Tests
[3]  
ALGLAVE J., 2021, SVE Architecture Pull Request
[4]  
ALGLAVE J., 2021, herdtools7
[5]  
Alglave J, 2016, Arxiv, DOI arXiv:1608.07531
[6]   Armed Cats: Formal Concurrency Modelling at Arm [J].
Alglave, Jade ;
Deacon, Will ;
Grisenthwaite, Richard ;
Hacquard, Antoine ;
Maranget, Luc .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2021, 43 (02)
[7]  
Alglave J, 2018, ACM SIGPLAN NOTICES, V53, P405, DOI [10.1145/3173162.3177156, 10.1145/3296957.3177156]
[8]   Don't Sit on the Fence: A Static Analysis Approach to Automatic Fence Insertion [J].
Alglave, Jade ;
Kroening, Daniel ;
Nimal, Vincent ;
Poetzl, Daniel .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2017, 39 (02)
[9]  
Alglave J, 2015, ACM SIGPLAN NOTICES, V50, P577, DOI [10.1145/2694344.2694391, 10.1145/2775054.2694391]
[10]   Herding Cats: Modelling, Simulation, Testing, and Data Mining for Weak Memory [J].
Alglave, Jade ;
Maranget, Luc ;
Tautschnig, Michael .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2014, 36 (02)