paperbot · PL 论文追踪

全部论文 待读 收藏

P2 C11Tester: a race detector for C/C++ atomics

C11Tester:面向 C/C++ 原子操作的竞态检测器
ASPLOS Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems2021匹配度 1/10 · 该论文研究 C/C++ 内存模型下的并发竞态检测,属于传统程序分析与并发领域,未涉及用户核心关注的 LLM/Agent 与程序分析交叉、浮点程序分析或贝叶斯程序分析。引用 26 inbox
Weiyu Luo, Brian Demsky
crossref: 2026-09-12

AI 速览

一句话:C11Tester 是一个覆盖比以往工具更大 C/C++ 内存模型片段的竞态检测器,用约束算法实现修改序。

在 C/C++ 内存模型下使用原子操作编写正确的并发代码极为困难,而现有竞态检测器只能探索该内存模型中很小的一个片段。本文提出 C11Tester,一个面向 C/C++ 内存模型的竞态检测器,相比已有工作能够探索更大的执行片段,其中包含 ARM 处理器所表现出的行为。为支持这一扩展,C11Tester 采用一种新的基于约束的算法来实现 modification order(修改序),并针对以应用可见行为为决策依据进行了优化,从而在更大执行空间中高效地判定竞态。作者在若干基准应用上评估 C11Tester,并将其性能与两类当前最优工具对比:控制调度的 tsan11rec 以及不控制调度的 tsan11,结果表明该工具在实际基准上具有可用的性能。

问题
在 C/C++ 内存模型下编写使用原子操作的正确并发代码极其困难,而此前的竞态检测器只能覆盖该内存模型的一小部分执行行为。
方法
提出 C11Tester,使用一种新的基于约束的算法实现 modification order,并针对以应用可见行为为依据的决策进行优化,从而覆盖包含 ARM 处理器行为的更大内存模型片段。
评估
在若干基准应用上评估 C11Tester,并与控制调度的 tsan11rec 和不控制调度的 tsan11 两个当前最优工具比较性能。
原文摘要(Abstract)

Writing correct concurrent code that uses atomics under the C/C++ memory model is extremely difficult. We present C11Tester, a race detector for the C/C++ memory model that can explore executions in a larger fragment of the C/C++ memory model than previous race detector tools. Relative to previous work, C11Tester's larger fragment includes behaviors that are exhibited by ARM processors. C11Tester uses a new constraint-based algorithm to implement modification order that is optimized to allow C11Tester to make decisions in terms of application-visible behaviors. We evaluate C11Tester on several benchmark applications, and compare C11Tester's performance to both tsan11rec, the state of the art tool that controls scheduling for C/C++; and tsan11, the state of the art tool that does not control scheduling.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot6109,
  title = {C11Tester: a race detector for C/C++ atomics},
  author = {Weiyu Luo and Brian Demsky},
  booktitle = {ASPLOS},
  year = {2021},
  doi = {10.1145/3445814.3446711}
}