Effective Bug Detection with Unused Definitions
Li Zhong, Chengcheng Xiang, Hung-Ming Huang, Bingyu Shen, Eric Mugnier, Yuanyuan Zhou · 2024
Unused definitions are values assigned to variables but not used. Since unused definitions are usually considered redundant code causing no severe consequences except for wasting CPU cycles, system developers usually treat them as mild warnings and simply remove them. In this paper, we reevaluate the effect of unused definitions and discover that some unused definitions could indicate non-trivial bugs like security issues or data corruption, which calls for more attention from developers.