Showing results for Diagnostics - C++ Team Blog

May 13, 2021
Post comments count0
Post likes count0

Microsoft C++ Code Analysis supports SARIF 2.1

Hwi-sung Im
Hwi-sung Im

Starting with Visual Studio 16.8, MSVC Code Analysis officially supports SARIF 2.1.0 standard. SARIF is an industry standard for representing static analysis logs and we've been one of the earliest collaborators with the SARIF Technical Committee. Behind the scenes, analysis log files in the SARIF format powers Visual Studio IDE to provide a richer...

C++Diagnostics
May 10, 2021
Post comments count3
Post likes count0

Finding Bugs with AddressSanitizer: Patterns from Open Source Projects

Kevin Cadieux
Kevin Cadieux

AddressSanitizer (ASan) was officially released in Visual Studio 2019 version 16.9. We recently used this feature to find and fix a bug in the MSVC compiler itself. To further validate the usefulness of our ASan implementation, we also used it on a collection of widely used open source projects where it found bugs in Boost, Azure IoT C SDK, and Ope...

C++Diagnostics
Oct 28, 2020
Post comments count4
Post likes count0

Even More New Safety Rules in C++ Code Analysis

Hwi-sung Im
Hwi-sung Im

In Visual Studio version 16.8 Preview 3,  we have added a few safety rules to C++ Code Analysis that can find some common mistakes, which can lead to bugs ranging from simple broken features to costly security vulnerabilities. These new rules are developed around issues discovered in production software via security reviews and incidents requiring ...

C++DiagnosticsWriting Code
Oct 12, 2020
Post comments count18
Post likes count0

Faster C++ builds, simplified: a new metric for time

Kevin Cadieux
Kevin Cadieux

C++ Build Insights is a collection of tools and APIs that can help you gain a deeper understanding of your build times. Today, we’d like to teach you about a special metric offered in this toolkit: the wall clock time responsibility (WCTR). It can be used to estimate how much time is really spent by each activity in your build, even in the presence...

C++Diagnostics
Oct 2, 2020
Post comments count13
Post likes count0

New Safety Rules in C++ Code Analysis

Hwi-sung Im
Hwi-sung Im

In Visual Studio version 16.8 Preview 3,  we are adding a few safety rules to C++ Code Analysis that can find some common mistakes, which can lead to bugs ranging from simple broken features to costly security vulnerabilities. These new rules are developed around issues discovered in production software via security reviews and incidents requiring ...

C++New FeatureDiagnostics
Aug 27, 2020
Post comments count4
Post likes count0

Introducing vcperf /timetrace for C++ build time analysis

Kevin Cadieux
Kevin Cadieux

The following blog post was written by guest author Carlos Fraguas from Mercury Steam Entertainment. He describes how he used the C++ Build Insights SDK to add the new /timetrace option in vcperf, and how he also used it to build custom tools tailored to his team's needs. You can follow Carlos on Twitter using handle @MetanoKid. Hello! I’m C...

AnnouncementDiagnostics
Jul 21, 2020
Post comments count0
Post likes count0

Improving code generation time with C++ Build Insights

Kevin Cadieux
Kevin Cadieux

Code generation time is a significant contributor to total build time for optimized builds. During this step of the compilation process, source code is passed through several algorithms that transform your program into an optimized version that can be executed more efficiently. In general, the optimization of a C++ function happens quickly and pose...

C++Diagnostics
May 28, 2020
Post comments count2
Post likes count0

Profiling template metaprograms with C++ Build Insights

Kevin Cadieux
Kevin Cadieux

The use of templates in C++ programs can sometimes lead to longer builds. C++ Build Insights puts tools at your disposal for analyzing template usage patterns and their associated impact on build time. In this article, we show you how to use the vcperf analysis tool and the C++ Build Insights SDK to understand and fix problematic template patterns....

C++Diagnostics
May 8, 2020
Post comments count14
Post likes count0

Faster builds with PCH suggestions from C++ Build Insights

Kevin Cadieux
Kevin Cadieux

The creation of a precompiled header (PCH) is a proven strategy for improving build times. A PCH eliminates the need to repeatedly parse a frequently included header by processing it only once at the beginning of a build. The selection of headers to precompile has traditionally been viewed as a guessing game, but not anymore! In this article, we wi...

C++Diagnostics