Linux version of PVS-Studio couldn’t help checking CodeLite

As is probably known to our readers, PVS-Studio static analyzer is exploring a new development direction – the Linux platform; as you may have noticed from the previous articles, it is doing well. This article shows how easily you can check a project with the help of the Linux version of the analyzer, because the simpler PVS-Studio for Linux is, the more supporters it will have. This time our choice was the CodeLite project. CodeLite was compiled and tested in Linux. Let’s see what results we got.


Continue reading

Finding bugs in the code of LLVM project

About two months ago I wrote an article about the analysis of GCC using PVS-Studio. The idea of the article was as follows: GCC warnings are great, but they’re not enough. As proof of my words I showed errors that PVS-Studio was able to find the GCC code. A number of readers have noticed that the quality of the GCC code, and its diagnosis, aren’t really great; while Clang compiler is up to date, of high quality, and fresh. In general Clang is awesome! Well, apparently, it’s time to check LLVM project.


Continue reading

Chromium, the 5th Check

We checked Chromium more than once before, and those who follow our blog could reasonably ask, “Why another check? Weren’t there enough of them?” Sure, Chromium’s source code is particularly clean, which was shown by each of the previous checks, but new errors inevitably continue to appear. Repeated checks prove that the more often you use static analysis, the better. A good practice is to use the analyzer every day. An even better practice is to analyze the new code right after you finish writing it (automatic analysis of recently modified code).


Continue reading

Part 25. Optimization of 64-bit programs

Reducing amounts of memory being consumed

When a program is compiled in the 64-bit mode, it starts consuming more memory than its 32-bit version. This increase often stays unnoticed, but sometimes memory consumption may grow twice. The growth of memory consumption is determined by the following factors: Continue reading

The Last Line Effect – typos and fun

Our team has checked a big number of projects – more than 250 and collected about 9800 bugs. Thus, we have studied many errors caused by the use of the Copy-Paste method, and can assure you that programmers most often tend to make mistakes in the last fragment of a homogeneous code block. We have never seen this phenomenon described in books on programming, so we decided to write about it and call it the “Last line effect”.

image2  Continue reading