|
|
|||
![]() PVS-Studio Static Code Analyzer for 64-bit and parallel C/C++ code
|
|||
![]() ![]() ![]() ![]() ![]()
02.09.2010
Feeling the new Intel Parallel Studio XE 2011 beta So I've gotten to try the C++ compiler included into Intel Parallel Studio XE 2011 beta at last.»
30.08.2010
Five days for fixing a two-character error, or a myth of almighty technologies aiding software development In this blog, you may often read posts about how this or that software tool or software development technology helps make fewer errors, find them faster and correct them easier.»
30.08.2010
d'Artagnan and Internet, or working on the problem of bad links Friends, it is high time we stopped considering links only in the context of their number and buying/ selling and counting PR of the site they are laid out on.» ![]()
22.07.2010
Using PVS-Studio with continuous integration systems This article illustrates techniques required to employ the use of PVS-Studio static code analyzer together with continuous integration systems.»
06.07.2010
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defects in 64-bit programs In the article, we will compare three mechanisms of code analysis from the viewpoint of detecting 64-bit errors: the Visual C++ 2010 compiler, the Code Analysis for C/C++ component included into Visual Studio 2010 and Viva64 analyzer included into PVS-Studio 3.60.»
29.06.2010
A Collection of Examples of 64-bit Errors in Real Programs
This article is the most complete collection of examples of 64-bit errors in the C and C++ languages.» ![]() |
Terminology![]() 64-bit errorIn our articles and documentation on PVS-Studio, this term means an error in C/C++ code that occurs when compiling the program in 64-bit mode. The code containing a 64-bit error correctly executes in 32-bit mode and causes a hang / access violation / slowdown / undefined behavior when launching the program built in the 64-bit configuration. Here is an example: float *Array = (char *)malloc(100 * sizeof(float)); char *ptr = Array + 50; unsigned index = -1; ptr[index] = 3.14f; This code will lead to the error "Access Violation" on a 64-bit system. The value of index variable is 0xFFFFFFFFu and access to an item with this index is impossible. However, this code might have successfully worked for ten years in the 32-bit program where the operation ptr+0xFFFFFFFFu is equivalent to the operation ptr-1. Such errors are described more thoroughly in the article "20 issues of porting C++ code on the 64-bit platform". Those errors that we call "64-bit" may also show up on the systems whose architecture differs from Intel 64 / IA64. The code containing "64-bit errors" is often inefficient and incorrect and performs the actions it has been designed to perform only due to mere luck and peculiarities of the 32-bit architecture. The term "64-bit error" is introduced to single out the class of errors the programmer starts to encounter with while developing code for a 64-bit system or porting the existing 32-bit code to a 64-bit platform. It is possible to describe and diagnose the class of 64-bit errors at the stage of coding and therefore significantly reduce costs on testing and support of the 64-bit version of a software product. The diagnosis of this error class is implemented to the most extent in the static analyzer Viva64 included into PVS-Studio. References
| ||