Part 2: Upsetting Opinions about Static Analyzers
By writing the article "Upsetting Opinions about Static Analyzers" we were supposed to get it off our chest and peacefully let it all go. However, the article unexpectedly triggered robust feedback. Unfortunately, the discussion went in the wrong direction, and now we will make a second attempt to explain our view of this situation.
Part 2: Upsetting Opinions about Static Analyzers
by Andrey karpov
From the article:
And started coming up with cases when it might be justified, which means that the PVS-Studio analyzer warning was a false-positive. Some speculations about the change in memory between two checks came into play which occurs due to:
- running parallel threads;
- signal/interrupt handlers;
- the variable X is a reference to the element A[0];
- hardware, such as performing DMA operations;
- and so on.
After heated debate on the analyzer's inability to comprehend all cases, they left to cut down forest with axes. In other words, they found an excuse why they could still avoid using a static code analyzer in their work.