Publication Type
Conference Proceeding Article
Version
publishedVersion
Publication Date
4-2024
Abstract
Dead Code Elimination (DCE) is a fundamental compiler optimization technique that removes dead code (e.g., unreachable or reachable but whose results are unused) in the program to produce smaller or faster executables. However, since compiler optimizations are typically aggressively performed and there are complex relationships/interplay among a vast number of compiler optimizations (including DCE), it is not known whether DCE is indeed correctly performed and will only delete dead code in practice. In this study, we open a new research problem to investigate: can DCE happen to erroneously delete live code? To tackle this problem, we design a new approach named Xdead, which leverages differential testing, static binary analysis, and dynamic symbolic execution techniques, to detect miscompilation bugs caused by the erroneously deleted live code. Preliminary evaluation shows that Xdead can identify many divergent portions indicating erroneously deleted live code and finally detect two such miscompilation bugs in LLVM compilers. Our findings call for more attention to the potential issues in existing DCE implementations and more conservative strategies when designing new DCE-related compiler optimizations.
Keywords
program analysis, Reliability, software testing, symbolic execution
Discipline
Software Engineering
Research Areas
Software and Cyber-Physical Systems
Publication
ICSE-NIER'24: Proceedings of the 2024 ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging: Lisbon, April 14-20
First Page
32
Last Page
36
ISBN
9798400705007
Identifier
10.1145/3639476.3639763
Publisher
ACM
City or Country
New York
Citation
TU, Haoxin; JIANG, Lingxiao; GAO, Debin; and JIANG, He.
Beyond a joke: Dead Code Elimination can delete live code. (2024). ICSE-NIER'24: Proceedings of the 2024 ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging: Lisbon, April 14-20. 32-36.
Available at: https://ink.library.smu.edu.sg/sis_research/8923
Copyright Owner and License
Authors
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
Additional URL
https://doi.org/10.1145/3639476.3639763