Understanding Compiler Bugs in Real Development
Hao Zhong
摘要
Compilers are critical in development, but compiler bugs can cause hidden and serious bugs in their compiled code. To deepen the understanding of compiler bugs, in the prior empirical studies, researchers read the bug reports and patches of compilers, and analyze their causes, locations, and patterns. Although they derive many interesting findings, their studies are limited. First, as bug reports seldom explain which projects encounter compiler bugs, it is infeasible to understand the outreaching impact. Second, before compiler bugs are fixed, programmers can bypass such bugs. The bug reports of compilers do not introduce such workarounds. Finally, the distribution of compiler bugs can be distorted, since researchers and compiler developers also file bug reports. In this paper, we propose a novel angle to analyze compiler bugs. Instead of compiler bug reports, we collect compiler bugs that are mentioned in real development. When programmers encounter compiler bugs in real development, they can leave traces in their commit messages. By searching such messages, we collected 644 unique commits whose messages explicitly mention the urls of compiler bugs. From this angle, in this paper, we conduct the first empirical study to analyze compiler bugs in the wild. We summarize our results into seven useful findings for users, compiler developers, and researchers. For example, for researchers, we find that some large workarounds of compiler bugs involve repetitive and systematic changes, which indicates a new research opportunity for code migration tools. Furthermore, we attempt to apply our findings in real development, and we obtain positive feedback. 1return _mm_set_epi32( * (int * )__P, (int)0,(int)0,(int)0); 2 + return _mm_set_epi32(0, 0, 0, ( * (__m32_u * )__P)[0]); google / XNNPACK Public Commit Work around _mm_loadu_si32 broken on latest gcc See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99754 for details master (#3149) Mar* authored and xnnpack-bot committed on Jun 15, 2022 1 parent 56ddd07 commit b627348 Code Issues 15 Pull requests 39 Actions Security Insights Browse files 216 src/amalgam/avx.c Large diffs are not rendered by default. 224 src/amalgam/avx2.c Large diffs are not rendered by default. 8 src/amalgam/avx512skx.c 3511 3511 const __m512i vbias = _mm512_load_si512(params->avx512.bias); 3512 3512 const __m512i va_multiplier = _mm512_load_si512(params->avx512.a_multiplier); 3513 3513 const __m512i vb_multiplier = _mm512_load_si512(params->avx512.b_multiplier); 3514 const __m128i vshift = _mm_loadu_si32(params->avx512.shift); -3514 const __m128i vshift = _mm_load_si128((const __m128i*) params->avx512.shift); + Load diff Load diff Showing 343 changed files with 10,063 additions and 10,063 deletions. Split Unified (a) a commit of XNNPACK 1 src/amalgam/avx2.c 2 @@ -3231,19 +3231,19 ... 3 -...= _mm_loadu_si32(w); 4 +...= _mm_cvtsi32_si128(((const int * ) w)[0]); 5 src/amalgam/avx512skx.c 6 @@ -3511,7 +3511,7 ... 7 -...= _mm_loadu_si32(params->avx512.shift); 8 +...= _mm_load_si128((const __m128i * ) params->avx512.shift);
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper7
- A comprehensive study of deep learning compiler bugsQingchao Shen, Haoyang Ma, Junjie Chen, Yongqiang Tian 等FSE 2021 · 被引用 123 次
- UniSan: Proactive Kernel Memory Initialization to Eliminate Data LeakagesKangjie Lu, Chengyu Song, Taesoo Kim, Wenke LeeCCS 2016 · 被引用 81 次
- Enhanced Compiler Bug Isolation via Memoized SearchJunjie Chen, Haoyang Ma, Lingming ZhangASE 2020 · 被引用 36 次
- Enriching Compiler Testing with Real Program from Bug ReportHao ZhongASE 2022 · 被引用 24 次
- Compiler Test-Program Generation via Memoized Configuration SearchJunjie Chen, Chenyao Suo, Jiajun Jiang, Peiqi Chen 等ICSE 2023 · 被引用 19 次
相关 Paper
- Silent Bugs Matter: A Study of Compiler-Introduced Security BugsJianhao Xu, Kangjie Lu, Zhengjie Du, Zhu Ding 等USENIX Security 2023
- Well-typed programs can go wrong: a study of typing-related bugs in JVM compilersStefanos Chaliasos, Thodoris Sotiropoulos, Georgios-Petros Drosos, Charalambos Mitropoulos 等OOPSLA 2021 · 被引用 31 次
- FLUX: Finding Bugs with LLVM IR Based Unit Test CrossoversEric Liu, Shengjie Xu, David LieASE 2023 · 被引用 8 次
- CombCT: Compiler Testing via Combinatorial TestingChuan Luo, Shaoke Cui, Jiahao Yan, Junjie Chen 等ICSE 2026
- On the Feasibility of Deduplicating Compiler Bugs with BisectionXintong Zhou, Zhenyang Xu, Yongqiang Tian, Chengnian SunISSTA 2026 · 被引用 1 次
