Mix Testing: Specifying and Testing ABI Compatibility of C/C++ Atomics Implementations
summary
Tooling and results: a new testing technique compiles individual C/C++ atomic operations with multiple mappings, links the permutations, and checks whether composed binaries exhibit forbidden source outcomes; the implemented atomic-mixer tool generates and runs these mixed binaries (simulation or hardware). It reproduces a known non-mixing bug, finds four previously-unknown mixing bugs in LLVM and GCC plus one prospective JVM mapping issue, and helps validate a newly specified Armv8 atomics ABI. The technique is exponential in mappings and operations; several bugs are fixed or triaged.
AI-written summary · about
chapters (7)
- 0:00Mix testing for C/C++ atomics
- 4:18High-level overview
- 7:27Mix testing technique and Atomic Mixer
- 9:11Mixing bugs in atomics
- 10:58ARM’s spec to prevent mixing bugs
- 12:46Summary of findings
- 13:30Q&A
related talks
22mWhat we learned from C++ atomics and memory model standardization
43mWhen Atomics Lose - Architecture‑Dependent Performance of C++ Synchronization
46mTestability and C++ API Design
21mModel Checking C/C++ with Mixed-Size Accesses
18mThe Semantics of Transactions and Weak Memory in x86, Power, ARM, and C++
58m“No Sane Compiler Would Optimize Atomics"
01h 03mSafety: off --- How not to shoot yourself in the foot with C++ atomics
54mThe C++ ABI From the Ground Up
