Product News

Finding Bugs with AddressSanitizer: MSVC Compiler--Augustin Popa

A very useful tool.

Finding Bugs with AddressSanitizer: MSVC Compiler

by Augustin Popa

From the article:

The AddressSanitizer (ASan) is generally available for MSVC since the recently-released Visual Studio 2019 version 16.9. We’ve already shown how easy it can be to find bugs in even production-ready code like EASTL. Here I’ll share an example of how it found a real bug in the MSVC compiler itself.

The idea was straightforward: ASan finds bugs, and we’re always interested in finding bugs in the compiler. Just like you can turn ASan on in your projects and run your tests, we’ve been turning on ASan on our project (the compiler) and running it on our tests. Sure enough, this found bugs...

ReSharper C++ 2021.1: Syntax Style, New C++ Features, and Improved Unreal Engine Support

ReSharper C++ 2021.1 is released!

ReSharper C++ 2021.1: Syntax Style, New C++ Features, and Improved Unreal Engine Support

by Elvira Mustafina

About the release

ReSharper C++ 2021.1 brings support for several new C++20 and C++17 language features, adds new inspections, and improves Unreal Engine support. You can now configure ReSharper C++ to match your code style even more closely with a new set of syntax style settings. The accompanying quick-fixes and context actions help you keep your code style consistent and update your code with ease.

  • C++ support: class types in non-type template parameters, C++20 class template argument deduction rules, noexcept as a part of the function type, and code completion for coroutines.
  • Unreal Engine: initial support for Unreal Engine 5, a postfix template for Cast, and support for the RIGVM_METHOD reflection macro.
  • Syntax style: a new set of code style settings for various aspects of the C++ syntax with accompanying inspections, quick-fixes, and context actions.
  • Code cleanup: new code cleanup tasks, the Cleanup selection context action, and performance improvements.
  • Code analysis: inspections with quick-fixes for redundant casts, template arguments that can be deduced, and variables that can be moved to the inner scope.

CLion 2021.1 release: global DFA, postfix completion, more MISRA checks, and other changes

CLion 2021.1 is released!

CLion 2021.1: New Code Analysis Options, Updates to Remote Mode, and Postfix Completion

by Anastasia Kazakova

About the release:

The CLion 2021.1 release is here! It catches more potential code quality issues,
enhances the debugging experience, and brings a more capable remote mode.

  • Code analysis
    • Global DFA is added and takes a whole translation unit of a program as a single unit for analysis to capture more potential issues.
    • New checks from MISRA C 2012 and MISRA C++ 2008 are introduced.
    • Clazy, a Qt-oriented static code analyzer, is now integrated into CLion.
  • Dynamic analysis tools
    • CLion can now calculate branch coverage.
    • Google Sanitizers, Valgrind Memcheck, and code coverage now works with remote toolchains.
  • Postfix completion for C and C++.
  • A new Open Project wizard.
  • Debugger:
    • GDB and LLDB have reached feature parity for core dump debugging in CLion.
    • Move execution point now works in the disassembly view.
  • For CMake projects:
    • Bundled CMake is upgraded to 3.19.
    • An ability to share CMake Profiles in VCS.
  • For Makefile projects:
    • Initial support for remote Makefile projects.
    • The Makefile Language plugin is now bundled into CLion.
  • VCS
    • Profile for pre-commit inspections.
    • Git commit templates.
  • Code With Me, a new JetBrains service for collaborative development and pair programming, is now bundled with CLion.

PVS-Studio Beta plugin for CLion (Win\Linux\macOS): It's less than a month away

PVS-Studio Beta plugin for CLion (Win\Linux\macOS). It's less than a month away. Want to be the first to try it? Just sign up here.

PVS-Studio Early Access Program

by PVS-Studio Team

Description:

PVS-Studio is a static analyzer that detects errors and potential vulnerabilities in the source code of programs written in C, C++, C#, and Java. In 2021 we are planning to release the PVS-Studio plugin for C++ IDE – CLion.

Cling -- Beyond Just Interpreting C++--Vassil Vassilev, Wim Lavrijsen, Alexandru Militaru

New tools.

Cling -- Beyond Just Interpreting C++

by Vassil Vassilev, Wim Lavrijsen, Alexandru Militaru

From the article:

In our previous blog post “Interactive C++ for Data Science” we described eval-style programming, interactive C++ in Notebooks and CUDA. This post will discuss some developed applications of Cling supporting interoperability and extensibility. We aim to demonstrate template instantiation on demand; embedding Cling as a service; and showcase an extension enabling on-the-fly automatic differentiation...

Example of How New Diagnostics Appear in PVS-Studio

Users sometimes ask how new diagnostics appear in the PVS-Studio static analyzer. We answer that we draw inspiration from a variety of sources: books, coding standards, our own mistakes, our users' emails, and others. Recently we came up with an interesting idea of a new diagnostic.

Example of How New Diagnostics Appear in PVS-Studio

by Andrey Karpov

From the article:

As for application software development, it doesn't make sense to enable them. The CovidSim project could do without them. Otherwise, a user will simply drown in a huge number of messages that are of little use in this case. For example, when experimenting with this set of diagnostics, we received more than a million warnings for some medium-sized open projects. Roughly speaking, every third line of code might be faulty in the view of MISRA. No one will scrape through all warnings, much less fix them. The project is either developed immediately taking into account MISRA recommendations, or this coding standard is irrelevant for it.
 

Creating other types of synchronization objects that can be used with co_await, part 2--Raymond Chen

The series continue.

Creating other types of synchronization objects that can be used with co_await, part 2

by Raymond Chen

From the article:

Last time, I teased a library for building awaitable synchronization objects. It builds on the code had earlier written for one-shot events by distilling the pattern to its essence and then rebuilding it in a more generic way...

PVS-Studio 7.12 New Features for Finding Safety and Security Threats

At the moment, PVS-Studio is developing not only as a static analyzer searching for code quality defects (quality control solution) but also as a solution for searching for security and safety defects.

PVS-Studio 7.12 New Features for Finding Safety and Security Threats

by Nikolay Mironov, Paul Eremeev

From the article:

Well, to waste no time, let's point out the additions right away. So, here is what's new, safe, and cool in PVS-Studio:

  • New diagnostic groups OWASP ASVS and The AUTOSAR C++14 Coding Guidelines have been added to the analyzer. Previously, the compliance of PVS-Studio diagnostic rules with these standards was available only on our website. Now we have more than 50 new diagnostic rules!
  • Now the analyzer shows information about the compliance of the warnings with the SEI CERT Coding Standard. This information formerly was available only on the PVS-Studio website.
  • The interface of our plugins for Visual Studio, JetBrains Rider, and IntelliJ IDEA has been improved to ease the work with analyzer messages that have safety and security standards identifiers.
  • New diagnostic groups (OWASP, AUTOSAR) in PlogConverter are supported.
  • New diagnostics (OWASP, AUTOSAR) are supported in SonarQube at the tag level. We classified our diagnostic rules by OWASP Top 10.

CLion 2021.1 EAP: Branch Coverage, New MISRA Checks, and Remote Makefile projects--Anastasia Kazakov

Interested?

CLion 2021.1 EAP: Branch Coverage, New MISRA Checks, and Remote Makefile projects

by Anastasia Kazakova

From the article:

A new CLion 2021.1 EAP build (211.6305.15) is now available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Note that if you are on macOS, there is a separate build for Apple Silicon (M1 chip)...