Our Articles
-
Static code analysis and the new language standard C++0x
01.04.2010The article discusses the new capabilities of C++ language described in the standard C++0x and supported in Visual Studio 2010. By the example of PVS-Studio we will see how the changes in the language influence static code analysis tools. Read more -
32 OpenMP Traps For C++ Developers
20.11.2009Since multi-core systems are spreading fast, the problem of parallel programming becomes more and more urgent. However, even the majority of experienced developers are new to this sphere. The existing compilers and code analyzers allow finding some bugs, which appear during parallel code development. However, many errors are not diagnosed. The article contains description of a number of errors, which lead to incorrect behavior of parallel programs created with OpenMP. Read more -
A Collection of Examples of 64-bit Errors in Real Programs
29.06.2010This article is the most complete collection of examples of 64-bit errors in the C and C++ languages. The article is intended for Windows-application developers who use Visual C++, however, it will be useful for other programmers as well. Read more -
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defects in 64-bit programs
06.07.2010In 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. I will show both the capabilities of detecting defects in 64-bit projects and preliminary diagnosis of 64-bit errors in the 32-bit code of projects. Read more -
64 bits
17.05.2010The article reveals the meaning of the term "64 bits". It briefly discusses the history of 64-bit system development, describes the most popular 64-bit processors of the Intel 64 architecture and the 64-bit Windows operating system. Read more -
The essence of the VivaCore code analysis library
09.01.2008The article tells developers about VivaCore library, preconditions of its creation, its possibilities, structure and scope of use. This article was written simultaneously with the development of VivaCore library and that's why some of the details of the final realization may differ from the features described here. But this won't prevent the developers from getting acquainted with the general work principles of the library, mechanisms of analysis and processing of C and C++ source code. Read more -
Parallel Lint
08.06.2009The article describes a new direction in development of static code analyzers - verification of parallel programs. The article reviews several static analyzers which can claim to be called "Parallel Lint". Read more -
OpenMP
20.11.2009The article briefly describes the OpenMP technology. Read more -
About size_t and ptrdiff_t
25.09.2009The article will help the readers understand what size_t and ptrdiff_t types are, what they are used for and when they must be used. The article will be interesting for those developers who begin creation of 64-bit applications where use of size_t and ptrdiff_t types provides high performance, possibility to operate large data sizes and portability between different platforms. Read more -
AMD64 (EM64T) architecture
02.10.2008The article briefly describes AMD64 architecture by AMD Company and its implementation EM64T by Intel Company. The architecture's peculiarities, advantages and disadvantages are described. Read more -
64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest
15.04.2008The purpose of this article is to answer some questions related to safe port of C/C++ code on 64-bit systems. The article is written as an answer to the topic often discussed on forums and related to the use of /Wp64 key and Viva64 tool. Read more
-
100 bugs in Open Source C/C++ projects
16.03.2012This article demonstrates capabilities of the static code analysis methodology. The readers are offered to study the samples of one hundred errors found in open-source projects in C/C++. All the errors have been found with the PVS-Studio static code analyzer. Read more -
How to make fewer errors at the stage of code writing. Part N4
14.12.2011This 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 and emergency conditions in programs. While examining a number of applications, I came to a conclusion that the error handling code is one of the most unreliable parts in C/C++ programs' sources. What are the consequences of such defects? An application must generate the message "file X is not found" but instead it crashes and forces the user to make guesses about what he/she is doing wrong. A program handling a data base produces an incomprehensible message instead of telling the user that there is just a field filled in incorrectly. Let's try to fight against this type of errors that haunt our users. Read more -
PVS-Studio advertisement - static analysis of C/C++ code
25.10.2011This document advertises the PVS-Studio static analyzer. It describes how using PVS-Studio reduces the number of errors in code of C/C++/C++11 projects and costs on code testing, debugging and maintenance. A lot of examples of errors are cited found by the analyzer in various Open-Source projects. The document describes PVS-Studio at the time of version 4.38 on October 12-th, 2011, and therefore does not describe the capabilities of the tool in the next versions. To learn about new capabilities, visit the product's site http://www.viva64.com or search for an updated version of this article. Read more -
PVS-Studio: analyzing ReactOS's code
01.09.2011Having checked ReactOS's code I managed to fulfill three of my wishes at once. Firstly, I had wanted for a long time to write an article on a common project. It's not interesting to check the source code of projects like Chromium: its quality is too high and a lot of resources are spent to maintain it, which are unavailable to common projects. Secondly, it's a good example to demonstrate the necessity of static analysis in a large project, especially when it is developed by a diverse and distributed team. Thirdly, I've got a confirmation that PVS-Studio is becoming even better and more useful. Read more -
How to make fewer errors at the stage of code writing. Part N3
07.07.2011This is the third article where I will tell you about a couple of new programming methods that can help you make your code simpler and safer. You may read the previous two posts here [1] and here [2]. This time we will take samples from the Qt project. Read more -
How we test the code analyzer
05.07.2011The article describes the testing technologies used when developing PVS-Studio static code analyzer. The developers of the tool for programmers talk about the principles of testing their own program product which can be interesting for the developers of similar packages for processing text data or source code. Read more -
PVS-Studio vs Chromium
23.05.2011Good has won this time. To be more exact, source codes of the Chromium project have won. Chromium is one of the best projects we have checked with PVS-Studio. Read more -
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by examples of errors detected in five open source projects
20.04.2011The article demonstrates errors detected with the static code analyzer integrated into Visual Studio 2010. The research was performed on five open source projects. The same projects were also checked with PVS-Studio. Results of comparing these two tools are presented at the end of the article. Read more -
Difficulties of comparing code analyzers, or don't forget about usability
31.03.2011Users' desire to compare different code analyzers is natural and understandable. However, it's not so easy to fulfill this desire as it may seem at first sight. The point is that you don't know what particular factors must be compared. Read more -
How to make fewer errors at the stage of code writing. Part N2
29.03.2011This is the second article on avoiding certain errors at the early stage of code writing. In the previous post, we have already advised you to avoid a large number of calculations in one expression. However, we should investigate this question in detail. Let's see what's dangerous about complex expressions and how we can avoid many logical errors. Read more -
How to make fewer errors at the stage of code writing. Part N1
09.03.2011I've arrived at the source code of a widely know instant messenger Miranda IM. Together with various plugins, this is a rather large project whose size is about 950 thousand code lines in C and C++. And like any other considerable project with a long development history, it has rather many errors and misprints. Read more -
Intel IPP Samples for Windows - error correction
27.01.2011This is one of my posts on how PVS-Studio makes programs safer. That is where and what types of errors it detects. This time it is samples demonstrating handling of the IPP 7.0 library (Intel Performance Primitives Library) we are going to examine. Read more -
Consequences of using the Copy-Paste method in C++ programming and how to deal with it
24.01.2011I create the PVS-Studio analyzer detecting errors in source code of C/C++/C++0x software. So I have to review a large amount of source code of various applications where we detected suspicious code fragments with the help of PVS-Studio. I have collected a lot of examples demonstrating that an error occurred because of copying and modifying a code fragment. Of course, it has been known for a long time that using Copy-Paste in programming is a bad thing. But let's try to investigate this problem closely instead of limiting ourselves to just saying "do not copy the code". Read more -
Regular use of static code analysis in team development
09.08.2010Static code analysis technologies are used in companies with mature software development processes. However, there might be different levels of using and introducing code analysis tools into a development process: from manual launch of an analyzer "from time to time" or when searching for hard-to-find errors to everyday automatic launch or launch of a tool when adding new source code into the version control system. Read more -
Interview with Issam Lahlali, one of the CppDepend tool creators
06.06.2010The article presents answers to the questions asked to Issam Lahlali that concern the developer tool CppDepend. Read more -
Changes in programmer tools' infrastructure
26.04.2010The article describes some observations concerning changes in the infrastructure of tools used by programmers in everyday work. First of all, these changes are related to the release of Visual Studio 2010. Read more -
VivaCore FAQ
09.12.2009This paper contains some questions and answers about VivaCore C/C++ code analysis library by OOO "Program Verification Systems". Read more -
VivaMP - a tool for OpenMP
20.11.2009At present, Viva64 and VivaMP software products are included in PVS-Studio as parts of it and are no longer distributed as separate applications. Please use PVS-Studio program to obtain the necessary possibilities of code verification.. Read more -
VivaMP, system of detecting errors in the code of parallel C++ programs using OpenMP
20.11.2009At present, Viva64 and VivaMP software products are included in PVS-Studio as parts of it and are no longer distributed as separate applications. Please use PVS-Studio program to obtain the necessary possibilities of code verification.. Read more -
Debugging and optimization of multi-thread OpenMP-programs
20.11.2009The task of familiarizing programmers with the sphere of developing parallel applications is getting more and more urgent. This article is a brief introduction into creation of multi-thread applications based on OpenMP technology. The approaches to debugging and optimization of parallel applications are described. Read more -
OpenMP and static code analysis
20.11.2009The article describes principles on which implementation of the static code analyzer VivaMP is based. The described set of testing logical conditions allows you to diagnose some errors in parallel programs created on the basis of OpenMP technology. Read more -
Interview with Anatoliy Kuznetsov, the author of BitMagic C++ library
08.11.2009In this article, Anatoliy Kuznetsov answers the questions and tells us about the open BitMagic C++ Library. Read more -
Comparing PVS-Studio with other code analyzers
14.10.2009The article discusses comparison of PVS-Studio code analyzer with other solutions in this sphere. As PVS-Studio contains modules for diagnosing 64-bit and parallel errors, it is compared to various types of tools. Read more -
An unsuccessful attempt to compare PVS-Studio (VivaMP) and Intel C/C++ ("Parallel Lint")
07.10.2009Initially, the article must have been titled "Comparison of diagnostic abilities of PVS-Studio (VivaMP) and Intel C/C++ Compiler ("Parallel Lint")". Absence of sufficient information about "Parallel Lint" restrained the author's abilities and the article turned out to be just a preliminary variant of the comparison. The full variant with correct comparison will be available in future. Pay attention that the article's content is relevant at the time of publishing. Further, diagnostic abilities of the both products can change. Read more -
64-bit Loki
25.09.2009The article is a report about testing of portability of Loki library with 64-bit systems with the help of Viva64 code analyzer performed by OOO "Program Verification Systems" Company. It contains recommendations for users of the library. The article will be also useful for the users of other libraries built on templates for it describes the peculiarities of analysis of such libraries. Read more -
How to estimate the process of 64-bit migration of C/C++ applications?
21.09.2009The article is devoted to the issue of estimating complexity and cost of migration of applications to 64-bit platforms. Such aspects as availability of various components of an application, libraries and development tools are considered. An example of using PVS-Studio program tool for estimating migration is given. Although the mentioned PVS-Studio product is oriented on C and C++ applications in Windows system, Unix-developers (and developers working in other systems) will find the article useful too. Read more -
Safety of 64-bit code
06.08.2009The article reviews the issues of providing safety of program code when adapting it for 64-bit systems. Read more -
Software code metrics
20.07.2009The article describes 7 types of metrics and more than 50 their representatives, provides a detailed description and calculation algorithms used. It also touches upon the role of metrics in software development. Read more -
A 64-bit horse that can count
11.05.2009The article concerns the peculiarities of Visual C++ compiler's behavior when generating 64-bit code and possible errors relating to it. Read more -
Seven Steps of Migrating a Program to a 64-bit System
19.04.2009The article describes the main steps which should be performed to correctly port 32-bit Windows applications on 64-bit Windows systems. Although the article is meant for developers using C/C++ in Visual Studio 2005/2008 environment, it will be also useful for other developers who plan to port their applications on 64-bit systems. Read more -
Interview with Dmitriy Vyukov - the author of Relacy Race Detector (RRD)
06.04.2009This is an interview with Dmitriy Vyukov - the author of Relacy Race Detector (RRD) tool intended for verifying parallel applications. In this article you will learn about the history of creating RRD, its basic abilities and also about some other similar tools and the way they differ from RRD. Read more -
Development of a static code analyzer for detecting errors of porting programs on 64-bit systems
26.03.2009The article concerns the task of developing a program tool called static analyzer. The tool being developed is used for diagnosing potentially unsafe syntactic structures of C++ from the viewpoint of porting program code on 64-bit systems. Here we focus not on the problems of porting occurring in programs, but on the peculiarities of creating a specialized code analyzer. The analyzer is intended for working with the code of C/C++ programs. Read more -
Estimation of the minimum time of executing tasks at optimal distribution of load among processors
25.03.2009The article briefly concerns methods of estimating the minimum time of executing tasks at optimal distribution of load among processors. The given methods can be used both for homogeneous and heterogeneous computer systems. Read more -
The static code analysis rules for diagnosing potentially unsafe constructions from the viewpoint of 64-bit programs
20.03.2009The article formulates the rules of diagnosing potentially unsafe syntactic constructions in source code of C++ programs and describes the principles of building a static source code analyzer implementing support of the mentioned rules. Read more -
Parallel programs to multi-processor computers!
04.02.2009For instance, when a man cannot manage everything he creates a tally for himself, brainless, irresponsible, able only to solder pins, or carry heavy loads, or write from dictation but doing this very well.. Read more -
Case Study: Porting a set of point cloud and triangle mesh processing C++ libraries to 64-bit platform
15.01.2009Italian company E.G.S. S.r.l. deals with development of solutions in the field of simulation of triangle mesh-based 3D objects. Read more -
Introduction into 64 bits for the beginners or where's again the 64-bit world?
15.01.2009There were 64-bit processors, the operational systems, some programs. However completely all users have passed to 64 bits still far not. In article the reasons of it are considered. Read more -
Konstantin Knizhnik: static analysis, a view from aside
10.01.2009The article is an interview with Konstantin Knizhnik taken by Andrey Karpov, "Program Verification Systems" company's worker. In this interview the issues of static code analysis, relevance of solutions made in this sphere and prospects of using static analysis while developing applications are discussed. Read more -
Installation of PC-Lint and its using in Visual Studio 2005
23.12.2008The article is devoted to the first acquaintance with the PC-Lint 8.0 static analyzer of C++ code. The process of the tool installation and its initial setting is described. Read more -
Parallel algorithms of data processing
09.12.2008This article is available only on Russian. Read more -
Testing parallel programs
02.11.2008Testing parallel software is a more complicated task in comparison to testing a standard program. The programmer should be aware both of the traps he can face while testing parallel code and existing methodologies and toolkit. Read more -
Optimization of 64-bit programs
12.10.2008Some means of 64-bit Windows applications performance increase are considered in the article. Read more -
How VivaCore library appeared
10.08.2008The article describes the main preconditions and stages of development of open VivaCore library intended for code analysis and creation of metaprogramming systems. VivaCore project is a development of OpenC++ library in which support of C and C++ language peculiarities specific for Visual Studio 2005/2008 is implemented. Read more -
Detection of vulnerabilities in programs with the help of code analyzers
10.08.2008At present there are a lot of tools intended for automating search of program vulnerabilities. This article describes some of them. Read more -
It is difficult
05.07.2008The article concerns the problem of excess of program creation terms as a result of a prejudice that programming is simple and even simpler. Read more -
Description of VivaVisualCode
02.07.2008This article concerns the program VivaVisualCode, showing how to use VivaCore library. VivaVisualCode represents in a graphic form the parse tree of the input source code in C++. Read more -
Comparison of analyzers' diagnostic possibilities at checking 64-bit code
30.05.2008The article compares a specialized static analyzer Viva64 with universal static analyzers Parasoft C++Test and Gimpel Software PC-Lint. The comparison is carried within the framework of the task of porting 32-bit C/C++ code on 64-bit systems or developing new code with taking into account peculiarities of 64-bit architecture. Read more -
Building of systems of automatic C/C++ code logging
13.05.2008Sometimes logging of an application's events is the only debugging method. The logging method's disadvantage is the large size of the code which you have to write manually to save the whole necessary information. The article touches upon the method allowing you to build a system of automatic logging of C/C++ code. Read more -
VivaCore - Quick Start
20.04.2008The document familiarizes developers with VivaCore library giving general information about the library, the scope of use, license agreements. It describes also the process of the library's deployment and an example of how to use it. Read more -
Advantages of Viva64
04.04.2008The purpose of this commercial article is to show advantages of Viva64 tool throughout the life cycle of software development. Read more -
Adaptation of the technology of the static code analyzer for developing parallel programs
16.02.2008In the article the question of use of the static code analyzers in modern parallel program development processes is considered. Having appeared in 70-80s as an addition to compilers, the static analyzers stopped to be popular with the developers in 90s. The reason was probably the increase of the errors diagnostics quality by the compilers. But in 2000s the interest to the static code analyzers started to increase again. It is explained by the fact that new static code analyzers were created, which started to detect quite difficult errors in programs. If the static code analyzers of the past made it possible, for example, to detect an uninitialized variable, modern static code analyzers tend to detect an unsafe access to data from several threads. The modern tendency of static code analyzers development became their use for diagnosing errors in parallel programs. In the work the situations are considered, where the use of such tools makes it possible to considerably simplify the process of creating parallel program solutions. Read more -
Development of resource-intensive applications in Visual C++
10.02.2008The article will familiarize application developers with tasks given them by the mass introduction of 64-bit multi-core processors symbolizing revolutionary increase of computing power available for an average user. It will also touch upon the problems of effective use of hardware resources for solving everyday applied tasks within the limits of Windows x64 operating system. Read more -
Using Static Analysis in Program Development
31.01.2008Static analysis allows checking program code before the tested program is executed. The static analysis process consists of three steps. First, the analyzed program code is split into tokens, i.e. constants, identifiers, reserved symbols, etc. This operation is performed by lexer. Second, the tokens are passed to parser, which builds an abstract syntax tree (AST) based on the tokens. Finally, the static analysis is performed over the AST. This article describes three static analysis techniques: AST walker analysis, data flow analysis and path-sensitive data flow analysis. Read more -
Introduction into the problems of developing parallel programs
21.01.2008As developing parallel software is rather a difficult task at present, the questions of theoretical training of specialists and investigation of methodology of projecting such systems become very urgent. Within the framework of this article we provide historical and technical information preparing a programmer for gaining knowledge in the sphere of developing parallel computer systems. Read more -
Brief description of the VivaCore code analysis library
12.01.2008While investigating the sphere of static analysis and working on the creation of the Viva64 tool our team came to a conclusion that the most part of the developed structures and algorithms can be united into a library and used by third-party developers for creating new software products. This library has been named VivaCore. Read more -
The use of the code analysis library OpenC++: modifications, improvements, error corrections
12.01.2008The article may be interesting for developers who use or plan to use OpenC++ library (OpenCxx). The author tells about his experience of improving OpenC++ library and modifying the library for solving special tasks. Read more -
Traps detection during migration of C and C++ code to 64-bit Windows
10.11.2007Appearance of 64-bit processors on PC market made developers face the task of converting old 32-bit applications for new platforms. After the migration of the application code it is highly probable that the code will work incorrectly. This article reviews questions related to software verification and testing. It also concerns difficulties a developer of 64-bit Windows application may face and the ways of solving them. Read more -
Application port to 64-bit platforms or never cackle till your egg is laid
08.11.200764-bit systems appeared more than 10 years ago, but we became closely acquainted with them comparatively recently when they came to the mass computer market. More and more software developers talk about the necessity of the support of such systems. Formerly 64-bit processors were mainly spread in the field of prolonged and complicated calculations - computational modeling of hydrodynamics and flow dynamics processes, deformable solid body mechanics, ecology and molecular chemistry ones, etc. They were also used for the maintenance of some ultra-large data bases. But today systems based on these processors can be observed as typical work stations. So, is it really necessary to port the applications to the 64-bit platforms? And if the decision of the porting is made, then by what means can it be done with the least time and financial costs? Let us see. Read more -
The forgotten problems of 64-bit programs development
11.08.2007Though the history of 64-bit systems development makes more than a decade, the appearance of 64-bit version of OS Windows raised new problems in the sphere of development and testing applications. In the article there are considered some mistakes connected with 64-bit C/C++ code development to OS Windows. The reasons are explained according to which these mistakes didn't find their reflection in the articles devoted to the migration tasks and are unsatisfactorily detected by the majority of static analyzers. Read more -
Viva64: What Is It, and Who Is It for?
30.07.2007At present, Viva64 and VivaMP software products are included in PVS-Studio as parts of it and are no longer distributed as separate applications. Please use PVS-Studio program to obtain the necessary possibilities of code verification.. Read more -
Some examples of the 64-bit code errors
23.07.2007While porting 32-bit software to 64-bit systems there may appear some errors in the code of applications which were written in C++ language. The cause for these hides in the alteration of the base data types (to be more exact, in the relations between them) with the new hardware platform. Read more -
Static code analysis for verification of the 64-bit applications
22.04.2007The coming of 64-bit processors to the PC market causes a problem which the developers have to solve: the old 32-bit applications should be ported to the new platform. After such code migration an application may behave incorrectly. The article is elucidating question of development and appliance of static code analyzer for checking out of the correctness of such application. Some problems emerging in applications after recompiling in 64-bit systems are considered in this article as well as the rules according to which the code check up is performed. Read more -
Problems of testing 64-bit applications
27.03.2007The article observes some questions related to testing the 64-bit software. Some difficulties which a developer of resource-intensive 64-bit applications may face and the ways to overcome them are described. Read more -
Driver Development for Windows 64-bit
24.03.2007Questions concerned with the release of drivers for 64-bit versions of Windows are considered in this article. Some typical problems and the ways of their solutions are listed in the article as well as tools which simplify the process of drivers developing. Read more -
20 issues of porting C++ code on the 64-bit platform
01.03.2007Program errors occurring while porting C++ code from 32-bit platforms on 64-bit ones are observed. Examples of the incorrect code and the ways to correct it are given. Methods and means of the code analysis which allow to diagnose the errors discussed, are listed. Read more -
64-bits for C++ Developers: from /Wp64 to Viva64
03.02.2007The development of the 64-bit solutions market has given some new tasks in the field of their verification and testing. The article describes one of such tools - Viva64. It's a lint-like static code analyzer assigned for exposure of errors related with the peculiarities of the 64-bit platforms. The prerequisites for the creation of such an analyzer and its connection with the "Detect 64-Bit Portability Issues" mode in C++ compiler Visual Studio 2005 are covered in the article. Read more -
Viva64: working up of 64-bit applications
14.12.2006At present, Viva64 and VivaMP software products are included in PVS-Studio as parts of it and are no longer distributed as separate applications. Please use PVS-Studio program to obtain the necessary possibilities of code verification.. Read more -
Peculiarities of the Development of 64-bit Applications
10.11.2006What did programmers get when 64-bit systems came to power? Besides the numerous advantages described in many advertising articles, programmers got the whole bunch of brainteasers, puzzles and even traps. Everyone who wants to get real advantages of using 64-bit systems has to face these ones. Read more