arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1611.01507cs.PL
收藏

C/C ++到POWER和ARMv7跟踪同步同步映射的反例和证明漏洞

Counterexamples and Proof Loophole for the C/C++ to POWER and ARMv7 Trailing-Sync Compiler Mappings

Yatin A. Manerkar, Caroline Trippel, Daniel Lustig, Michael Pellauer, Margaret Martonosi

摘要:

C和C++高级语言为程序员提供了编写高性能并发代码的原子操作。在汇编语言级别,C和C++原子被编译器映射到单个指令或指令组合,这取决于底层架构提供的排序保证和同步指令。这些编译器映射必须支持C/C++原子提供的排序保证,否则编译后的程序将不会按照C/C++内存模型运行。在本文中,我们讨论了两个反例,以著名的跟踪同步编译器映射的权力和ARMv7架构,以前被认为是被证明是正确的。除了反例,我们还讨论了映射证明中的漏洞,它允许不正确的映射被证明是正确的。我们还讨论了当前状态的编译器和架构的错误。

英文摘要:

The C and C++ high-level languages provide programmers with atomic operations for writing high-performance concurrent code. At the assembly language level, C and C++ atomics get mapped down to individual instructions or combinations of instructions by compilers, depending on the ordering guarantees and synchronization instructions provided by the underlying architecture. These compiler mappings must uphold the ordering guarantees provided by C/C++ atomics or the compiled program will not behave according to the C/C++ memory model. In this paper we discuss two counterexamples to the well-known trailing-sync compiler mappings for the Power and ARMv7 architectures that were previously thought to be proven correct. In addition to the counterexamples, we discuss the loophole in the proof of the mappings that allowed the incorrect mappings to be proven correct. We also discuss the current state of compilers and architectures in relation to the bug.

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

↑