Abstract:
Detection of dead code (i.e. the code which is executed, but does not affect an observable program behavior) is commonly used by compilers as a part of optimization techniques for redundant code elimination. At the same time dead function calls might be seen as a kind of program source code defects, which may point to serious program logic faults. We describe a new detector for this kind of issues developed as a part of Svace static defect detection tool, as well as the specific cases, which should be filtered out for practical detection of dead functions calls as program errors in contrast to their formal definition.
Keywords:static analysis, software defects, dead code, useless code, side effects, SVACE, C/C++ programming languages, Go programming language, symbolic execution, data-flow analysis, live variable analysis, interprocedural analysis