arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2310.12337cs.PLcs.ARcs.SE
收藏

基于松弛内存模型的编译器测试

Compiler Testing With Relaxed Memory Models

Luke Geeson, Lee Smith

AI总结:

针对现有并发编译器测试技术无法兼顾边界内漏洞覆盖与大规模程序可扩展性的问题,提出工业级测试工具Téléchat,通过对比源与架构内存模型下的程序行为发现漏洞,性能优于现有技术且已部署应用。

摘要:

发现漏洞是保障当前广泛使用的编译器正确性的关键。如果编译后程序在其架构内存模型允许下的行为,不属于源程序在其源模型下的行为,则存在漏洞。这一结论适用于所有程序,但我们重点关注仅在两个或更多执行线程下出现的并发漏洞。我们聚焦于检测C/C++编译器中此类漏洞的测试技术。\n 我们寻求一种测试技术,它能在程序大小的固定边界内自动覆盖并发漏洞,并且具备可扩展性,能够在包含大量代码行的编译程序中发现漏洞。否则,测试技术可能会遗漏漏洞。遗憾的是,现有最先进的技术尚未同时满足所有这些特性。\n 我们提出了面向并发程序的编译器测试工具Téléchat。Téléchat编译并发C/C++程序,并利用源内存模型和架构内存模型比较源程序与编译后程序的行为。我们提出三项主张:Téléchat在多线程执行代码生成的漏洞发现方面优于现有最先进技术;它是首个公开描述的已部署于工业界的并发编译器测试工具;它也是首个朝着理想特性迈出重要一步的工具。我们提供的实验证据表明Téléchat能发现其他现有最先进技术遗漏的漏洞,案例研究显示Téléchat满足上述特性,同时我们还报告了将Téléchat部署于工业界回归测试的经验。

英文摘要:

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éléchat compiler testing tool for concurrent programs. Téléchat compiles a concurrent C/C++ program and compares source and compiled program behaviours using source and architecture memory models. We make three claims: Téléchat 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éléchat finds bugs missed by other state-of-the-art techniques, case studies indicating that Téléchat satisfies the properties, and reports of our experience deploying Téléchat in industry regression testing.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑