一句话:提出半自动流水线,从 Go 并发修复 PR 差异重建可执行触发测试,门通过率从 2% 提升至 15%。
公开 PR 与 CVE 公告是 Go 并发缺陷研究的重要素材,但历史项目难以重建,且许多修复缺少可复用的触发测试,导致难以获得可执行基准样本。本文提出 PR2Trigger,一个从修复型 PR diff 重建 PR 局部化触发测试的半自动流水线。针对历史构建难题,它提取由 PR 修改符号及其项目内依赖构成的自包含包,并在固定版本的 Docker 环境中执行;针对触发测试缺失问题,它利用大语言模型合成支撑代码与并发驱动测试入口,而确定性脚本负责执行、失败检测与定位匹配。在 100 个 Go 竞态修复候选 PR 上,PR2Trigger 将门通过率从 2% 提升到 15%,相对开发者自带测试取得 7.5 倍改进。
Public PRs and CVE advisories are valuable sources for Go concurrency-bug research, but rarely provide executable benchmark samples because historical projects are difficult to rebuild and many fixes lack reusable triggering tests. We present PR2Trigger, a semi-automated pipeline that reconstructs PR-localized triggering tests from fix-PR diffs. To address historical build difficulty, PR2Trigger extracts a self-contained package of PR-modified symbols and their in-project dependencies, and executes it in a pinned Docker environment. To address missing triggering tests, PR2Trigger uses a large language model to synthesize support code and a concurrency-driving test entry, while deterministic scripts handle execution, failure detection, and localization matching. On 100 Go race-fix candidate PRs, PR2Trigger improves the gate-passing rate from 2% to 15%, a 7.5× improvement over developer-supplied tests.
@inproceedings{paperbot12538,
title = {PR2Trigger: From Concurrency-Fix PR Diffs to Executable Triggering Tests for Go},
author = {Risheng Wei and Yuheng Shen and Yiming Ye and Yuchen Yan and Yihao Peng and Hao Xi and Yue Chen and Hai Wan and Xibin Zhao},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834543}
}