PVS-Studio 7.38 has been released. This version brings the new core for the C and C++ analyzer, the user annotation mechanism in the Java analyzer, enhanced taint analysis, and that's not all! See more details in this note.
You can download the latest PVS-Studio version here.
New core for C and C++ analyzer
The C and C++ analyzer got a new core with completely redesigned components like a parser, a semantic analyzer, and a type system. The new core provides more accurate handling of template constructs and better parsing of the standard library and code based on modern C++ standards. During the extended testing period (EAP), the new core demonstrated stable performance across a wide range of real-world projects.
To maintain backward compatibility, we've left the temporary switch back to the previous core version. You can do this in several ways:
pvs-studio-analyzer
utility via the ‑‑use-old-parser
flag..pvsconfig
configuration file of diagnostic rules via the //V_USE_OLD_PARSER
flag.Settings.xml
analysis configuration file via the <UseOldCppParser>
tag.If you encounter any issues during analysis, we recommend contacting our technical support. Your feedback helps us accelerate the finalization of the new C and C++ analyzer core.
User annotations in Java analyzer
PVS-Studio Java analyzer has been enhanced with user annotations, a mechanism for marking types and functions in JSON format to provide additional information to the analyzer. This feature was previously available only in the C and C++ analyzer.
Now you can annotate methods and constructors as sources, sinks, or validators of tainted data. This feature allows the analyzer to detect more vulnerabilities, each of which matches a separate diagnostic rule.
More details on user annotations can be found in the documentation.
Classification of diagnostic rules according to the MISRA standard
The PVS-Studio warning classification page for MISRA C and MISRA C++ now includes a version-based listing.
We continue to expand the coverage of the MISRA C 2023 standard and plan to finish it by the end of 2025.
More details on warning classification can be found in the documentation.
Enhanced taint analysis mechanism
We've improved taint analysis in the C and C++ analyzer. Now, taint tracking works correctly with the %
operator, warnings are no longer skipped in the ReadFile
function, and taint status handling in branches has been enhanced. These updates improve the detection of potential vulnerabilities related to unverified data.
Breaking changes
These changes are not backward compatible with earlier versions of the analyzer. You may need to adjust how you use the analyzer due to these changes.
= delete
. As a result, previously suppressed warnings may reappear in the analyzer report.New diagnostic rules
C and C++:
C#:
Java:
Articles
For C++ developers:
For C# developers:
For Java developers:
Other articles:
Useful video for working with PVS-Studio
What is PVS-Studio?
In this video, we'll talk about the key concept and aspects related to PVS-Studio static analyzer. You'll find out not just how PVS-Studio can help you, but also what mechanisms and approaches it uses.
You can watch it by this link.
How to integrate PVS-Studio analysis results into SonarQube
The PVS-Studio plugin allows you to add analyzer messages to the SonarQube message database. In the video, we'll show you how to integrate the PVS-Studio analysis results into SonarQube using a C++ project check as an example.
You can watch it by this link.
How to use PVS-Studio extension in Visual Studio Code
In this video, we'll take a closer look at an extension that enables you to use the PVS-Studio analyzer in Visual Studio Code.
You can watch it by this link.
How to work with PVS-Studio in the Visual Studio IDE
The PVS-Studio plugin for the Microsoft Visual Studio IDE provides a wide range of features. In this video, we'll show you how to install the analyzer, run the analysis on a project, and what settings may help you make the analysis more accurate.
You can watch it by this link.
Do you want to check a project with PVS-Studio? Then start from this page.
If you would like to get news on the latest releases, subscribe to the PVS-Studio newsletter here.
0