Detection of Bugs by Compiler Optimizer Using Macro Expansion of Functions
D. T. V. Ramakrishna Rao · 2007
A new static analysis based approach is proposed to detect interface bugs in software. Unlike existing static analyses, which suggest new tools, this approach does not suggest a new tool, but leverages the optimizer which is part of the compiler already used by programmers. To facilitate the optimizer in detecting the interface bugs of a function, a macro is created which encodes the conditions to be checked for the function arguments. The approach is found to be effective when applied on two already well-tested commercial software systems, where it detected more than 50 bugs.