From Stochastic to Semantic: Advanced Attribute-Guided Compiler Testing

Compiler testing is critically important, as compilers serve as the foundational infrastructure in system software development. A comprehensive exploration of the compilation space is essential for uncovering bugs in compilers. Existing methods primarily involve the utilization of various compilation options alongside test programs as inputs for stress-testing compilers. However, these compilation options are typically applied uniformly across all program elements-such as functions and variables, by default, limiting the ability to thoroughly explore the compilation space. In programming languages like C and C++, attributes such as the __attribute__((always_inline)) directive provide a mechanism for programmers to specify additional information for specific code elements to the compiler. These attributes allow for precise control over the compilation process, such as enforcing constraints and customizing optimization passes for particular elements. This flexibility in specifying attributes offers opportunities to investigate previously unexamined areas within compilers. Unfortunately, few studies have leveraged attributes for compiler testing. To this end, we propose Atlas, an attribute-guided approach that strategically inserts attributes into test programs to facilitate a more thorough exploration of the compilation space. Our key insight is that attributes specified for individual program elements can provide a more flexible means of exploring the compilation space. Our extensive experiments on GCC and LLVM demonstrate the superiority of Atlas over baseline testing techniques that do not employ attributes, particularly in terms of bug detection and code coverage. Furthermore, Atlas has led to the discovery of 97 unique bugs in GCC and LLVM, 73 of which have already been confirmed or fixed, showcasing its practical utility

Authors

Institutions

Publication Details

Journal
ACM Transactions on Software Engineering and Methodology
Published
2026-02-05
DOI
https://doi.org/10.1145/3793554
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

From Stochastic to Semantic: Advanced Attribute-Guided Compiler Testing

Jiangchang Wu, Lei Xu, Maolin Sun, Yibiao Yang et al.
ACM Transactions on Software Engineering and Methodology
Software Testing and Debugging Techniques
article

From Stochastic to Semantic: Advanced Attribute-Guided Compiler Testing

Jiangchang Wu, Lei Xu, Maolin Sun, Yibiao Yang, Qingyang Li, Yuming Zhou, Kang Chen
article en

Abstract

Compiler testing is critically important, as compilers serve as the foundational infrastructure in system software development. A comprehensive exploration of the compilation space is essential for uncovering bugs in compilers. Existing methods primarily involve the utilization of various compilation options alongside test programs as inputs for stress-testing compilers. However, these compilation options are typically applied uniformly across all program elements-such as functions and variables, by default, limiting the ability to thoroughly explore the compilation space. In programming languages like C and C++, attributes such as the __attribute__((always_inline)) directive provide a mechanism for programmers to specify additional information for specific code elements to the compiler. These attributes allow for precise control over the compilation process, such as enforcing constraints and customizing optimization passes for particular elements. This flexibility in specifying attributes offers opportunities to investigate previously unexamined areas within compilers. Unfortunately, few studies have leveraged attributes for compiler testing. To this end, we propose Atlas, an attribute-guided approach that strategically inserts attributes into test programs to facilitate a more thorough exploration of the compilation space. Our key insight is that attributes specified for individual program elements can provide a more flexible means of exploring the compilation space. Our extensive experiments on GCC and LLVM demonstrate the superiority of Atlas over baseline testing techniques that do not employ attributes, particularly in terms of bug detection and code coverage. Furthermore, Atlas has led to the discovery of 97 unique bugs in GCC and LLVM, 73 of which have already been confirmed or fixed, showcasing its practical utility

ACM Transactions on Software Engineering and Methodology
Nanjing University (CN)
Industry, innovation and infrastructure
Openalex Percentile: Top 71%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.