In different programming languages, the behavior of virtual functions differs when it comes to constructors and destructors. Incorrect use of virtual functions is a classic mistake. Developers often use virtual functions incorrectly. In this article, we discuss this classic mistake.
- New
- Top
A variety of errors in C# code by the example of CMS DotNetNuke: 40 questions about the quality
Today, we discuss C# code quality and a variety of errors by the example of CMS DotNetNuke. We're going to dig into its source code. You're going to need a cup of coffee...
Thanks, Mario, but the code needs fixing — checking TheXTech
It's cool when enthusiastic developers create a working clone of a famous game. It's even cooler when people are ready to continue the development of such projects! In this article, we check TheXTech with PVS-Studio. TheXTech is an open implementation of the game from the Super Mario universe.
How the Carla car simulator helped us level up the static analysis of Unreal Engine 4 projects
One of the mechanisms of static analysis is method annotations of popular libraries. Annotations provide more information about functions during errors detecting. CARLA is an impressive open-source project in C++ that helped us implement this mechanism to our analyzer. Subsequently, the simulator became a test-target for the improved PVS-Studio static analyzer.
PVS-Studio checks the code quality in the .NET Foundation projects: LINQ to DB
![](https://webcf.waybackmachine.org/web/20211128033255im_/https://habrastorage.org/getpro/habr/upload_files/54b/7d5/a72/54b7d5a7227696b100a070e8b3f81063.png)
The .NET Foundation is an independent organization, created by Microsoft, to support open-source projects around the DotNet platform. Currently, the organization gathered many libraries under its wing. We have already tested some of these libraries with the help of PVS-Studio. The next project to check with the analyzer - LINQ to DB.
PVS-Studio to check the RPCS3 emulator
RPCS3 is an interesting project that emulates the PS3 console. It is actively evolving. Recently we heard the news that the emulator learned how run all the games from the console's catalog. That's a good excuse to analyze the project. We'll see which errors remained after new fixes were added to the project.
All hail bug reports: how we reduced the analysis time of the user's project from 80 to 4 hours
People often see work in support as something negative. Today we'll look at it from a different perspective. This article is about a real communication of 100+ messages, exceptions, the analysis that didn't complete in three days...
How to choose a static analysis tool
![](https://webcf.waybackmachine.org/web/20211128033255im_/https://habrastorage.org/getpro/habr/upload_files/ac0/d6c/e8b/ac0d6ce8ba79525a7bbdb70c063bbbc6.png)
Tools to improve and control code quality can be a key success factor in a complex software project implementation. Static analyzers belong to such tools. Nowadays, you can find various static analyzers: from free open-source to cross-functional commercial solutions. On the one hand, it's great – you can choose from many options. On the other hand – you have to perform advanced research to find the right tool for your team.
Protocol Buffers, a brutal protocol from Google, vs. PVS-Studio, a static code analyzer
Protocol Buffers is a very popular, cool, and high-quality product that is mostly developed by Google. This is a good challenge for the PVS-Studio static code analyzer. Finding at least something is already an achievement. Let's give it a shot.
PVS-Studio searches for bugs in the DuckStation project
We often check retro games. In our company, many developers like to find interesting projects for themselves. They feel nostalgic when they're studying these projects. But we need to run retro games on something, right? This time we checked a project that helps to run old games on modern hardware.
How a PVS-Studio developer defended a bug in a checked project
![](https://webcf.waybackmachine.org/web/20211128033255im_/https://habrastorage.org/getpro/habr/upload_files/ee3/0f0/235/ee30f0235353f4401be4e343105cae3f.png)
The PVS-Studio developers often check open-source projects and write articles about that. Sometimes, when writing an article, we come across interesting situations or epic errors. Of course, we want to write a small note about it. This is one of those cases.
Best warnings of static analyzer
![](https://webcf.waybackmachine.org/web/20211128033255im_/https://habrastorage.org/getpro/habr/upload_files/cf2/86e/765/cf286e765d319d419c0819b010cca186.png)
Everyone who runs the static analyzer on a project for the first time is slightly shocked by hundreds, thousands or even tens of thousands of warnings. It may be frustrating. Is my code so terrible? Or is the analyzer lying? In any case, filtering by the severity changes the situation, not completely though. That's why we thought about how we could improve the first experience with the analyzer. Let me show you the new feature step by step...
How we sympathize with a question on StackOverflow but keep silent
On the stackoverflow.com website, we frequently see questions about how to look for bugs of a certain type. We know that PVS-Studio can solve the problem. Unfortunately, we have to keep silent. Otherwise, StackOverflow moderators may consider it as an obvious attempt to promote our product. This article describes a particular case of such a situation that makes us suffer deeply.
OWASP Top Ten and Software Composition Analysis (SCA)
![](https://webcf.waybackmachine.org/web/20211128033255im_/https://habrastorage.org/getpro/habr/upload_files/e7c/cbb/8df/e7ccbb8df60a845046510a020f5f400c.png)
The OWASP Top Ten 2017 category A9 (which became A6 in OWASP Top Ten 2021) is dedicated to using components with known vulnerabilities. To cover this category in PVS-Studio, developers have to turn the analyzer into a full SCA solution. How will the analyzer look for vulnerabilities in the components used? What is SCA? Let's try to find the answers in this article!
What's new in C# 10: overview
![](https://webcf.waybackmachine.org/web/20211128033255im_/https://habrastorage.org/getpro/habr/upload_files/d7f/408/590/d7f408590fda3181cad7882c2473e55f.png)
This article covers the new version of the C# language - C# 10. Compared to C# 9, C# 10 includes a short list of enhancements. Below we described the enhancements and added explanatory code fragments. Let's look at them.
C++ tools evolution: static code analyzers
Modern applications have lots of code. And the C++ language doesn't get easier. Nowadays, code reviews are not enough to fully analyze program code. Here's where static code analysis comes in.
PVS-Studio 7.15: MISRA, CWE, OWASP, Unreal Engine
We are actively developing the PVS-Studio static analysis tool towards detecting Safety and Security-related errors. To be more precise, we've expanded the coverage of the MISRA C:2012 and OWASP ASVS standards. We have supported the MISRA Compliance 2020 standard. One of the more extraordinary innovations is the Best Warnings display mode. This mode displays the most significant (meaningful) warnings and can be useful when you are just starting out with the analyzer.
Detecting errors in the LLVM release 13.0.0
Commercial static analyzers perform deeper and fuller code analysis compared to compilers. Let's see what PVS-Studio found in the source code of the LLVM 13.0.0 project.
Software testers — an endangered species?
![](https://webcf.waybackmachine.org/web/20211128033255im_/https://habrastorage.org/getpro/habr/upload_files/c7e/fc3/f5c/c7efc3f5c309f87d173c02cea1e32982.png)
Nothing and nobody will escape oblivion. Whatever you may say, the history of mankind is a history of automation and the subsequent evolution of workers. This happened both during the first industrial revolution and during the second. The same thing happened with digital revolution. Now machine learning and artificial intelligence are being implemented everywhere. What is the future of software testing?
CWE Top 25 2021. What is it, what is it for and how is it useful for static analysis?
For the first time PVS-Studio provided support for the CWE classification in the 6.21 release. It took place on January 15, 2018. Years have passed since then and we would like to tell you about the improvements related to the support of this classification in the latest analyzer version.