While porting code from a 32-bit system to a 64-bit one, you may want to make the types size_t/ptrdiff_t 32-bit again to reduce the number of errors and warnings generated by the compiler. This...
Why is the value of the %ProgramFiles% environment variable replaced with the value of %ProgramFiles(x86)% when accessing it from a 32-bit program launched in a 64-bit operating...
Memsize-types DWORD_PTR, INT_PTR, LONG_PTR, UINT_PTR and ULONG_PTR are intended to support 64-bit code and can safely store a pointer regardless of the platform capacity. But these types might...
We decided to publish this article in our knowledge base to show programmers how easily private data can get out of the program handling them. There is the V597 diagnostic rule in PVS-Studio...
The most important thing I have done as a programmer in recent years is to aggressively pursue static code analysis. Even more valuable than the hundreds of serious bugs I have prevented with it...
Any static code analyzer works slower than a compiler. It is determined by the fact that the compiler must work very quickly, though to the detriment of analysis depth. Static analyzers have to...
This is the fourth post in which I want to share with you some useful observations on error patterns and the ways of fighting them. This time I will touch upon the subject of handling rare...
From the very beginning duplicates of messages in our analyzer PVS-Studio have been eliminated. For example, if a diagnostic message is generated for a code in an .h-file included into...
We believe that the best way of promoting our static code analyzer PVS-Studio is using it to check famous open source projects (like Chromium, Clang, WinMerge and many others) and writing articles...
As with any other native Windows program, there exists a possibility of an unhandled exception being raised during the operation of PVS-Studio analyzer (the PVS-Studio.exe process in...