arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.09474cs.PLcs.ARcs.SE
收藏

弱内存需求驱动基于模型的编译器测试

Weak Memory Demands Model-based Compiler Testing

Luke Geeson

AI总结:

本文指出处理器对宽松内存模型的利用使编译后并发程序暴露新缺陷,提出需发展基于模型的编译器测试,并通过LLVM工具链缺陷案例探讨其对编译器、测试工具和并发测试生成器的广泛影响。

摘要:

如果编译后的并发程序在其架构内存模型允许下的行为,不是源程序在其源模型下所允许的行为,则会产生编译器缺陷。人们可能合理地认为,自C/C++内存模型引入以来的十年间,大多数编译器缺陷已被发现。我们观察到,处理器实现正越来越多地利用宽松架构模型的行为。因此,编译后的程序可能表现出在旧硬件上未见的缺陷。为了应对这一点,我们需要基于模型的编译器测试。虽然这一观察并不令人意外,但其影响是广泛的。编译器及其测试工具将需要更新以跟随硬件放宽,并发测试生成器将需要改进,先前工作的假设将需要重新审视。我们利用在LLVM中报告的一个编译器工具链缺陷来探索这些想法。

英文摘要:

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 reported in LLVM.

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

↑