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 T\'el\'echat compiler testing tool for concurrent programs. T\'el\'echat compiles a concurrent C/C++ program and compares source and compiled program behaviours using source and architecture memory models. We make three claims: T\'el\'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 T\'el\'echat finds bugs missed by other state-of-the-art techniques, case studies indicating that T\'el\'echat satisfies the properties, and reports of our experience deploying T\'el\'echat in industry regression testing.
翻译:发现错误是确保当前广泛使用的编译器正确性的关键。如果编译后程序在体系结构内存模型允许下的行为,并非源程序在其源模型下的行为,则存在错误。这一结论适用于所有程序,但我们重点关注仅出现在两个及以上执行线程中的并发错误。我们专注于检测C/C++编译器中此类错误的测试技术。我们寻求一种能够自动覆盖程序大小固定范围内并发错误,且能扩展到检测包含多行代码编译后程序错误的测试技术。否则,测试技术可能会遗漏错误。遗憾的是,当前最先进的技术尚未满足所有这些特性。我们提出了用于并发程序的Téléchat编译器测试工具。Téléchat编译并发C/C++程序,并使用源模型和体系结构内存模型比较源程序与编译后程序的行为。我们提出三个主张:Téléchat改进了多线程执行代码生成中错误检测的现有水平,它是首个公开发布的工业界部署的并发编译器测试工具,并且是首个向所需特性迈出重要一步的工具。我们提供了实验证据表明Téléchat能发现其他先进技术遗漏的错误,案例研究显示Téléchat满足这些特性,并报告了我们在工业回归测试中部署Téléchat的经验。