Tag Archives: visual studio

Analyzing a Confusing Crash–Stack Walks Gone Bad

Part of my job always seems to include crash analysis. A program crashes on a customer’s machine, a minidump is uploaded to the cloud, and it might be my desk that it appears on when Monday morning rolls around. The … Continue reading

Posted in Debugging | Tagged , | 8 Comments

Compiler Bugs Found When Porting Chromium to VC++ 2015

Moving a big software project to a new compiler can be a lot of work, and few projects are bigger than Chromium. In addition to the main Chromium repository, which includes all of Blink, there are over a hundred other … Continue reading

Posted in Programming, Visual Studio | Tagged , , , | 29 Comments

Programming is Puzzles

When I’m describing what I do for a living to non-programmers I sometimes say that I solve puzzles. I solve fascinating puzzles that are different every day, and there’s no answer key, and very often nobody else knows the solution. … Continue reading

Posted in Investigative Reporting, Performance, Programming, Visual Studio | Tagged , , , | 11 Comments

Make VC++ Compiles Fast Through Parallel Compilation

The free lunch is over and our CPUs are not getting any faster so if you want faster builds then you have to do parallel builds. Visual Studio supports parallel compilation but it is poorly understood and often not even … Continue reading

Posted in Performance, Visual Studio, xperf | Tagged , , , , | 50 Comments

How to Report a VC++ Code-Gen Bug

My coworkers recently found a bug in the x64 code generated by Visual C++. This bug exists in VC++ 2010 to VC++ 2013 RC. We put in a workaround (the traditional one of disabling optimizations for the afflicted function) and … Continue reading

Posted in Bugs, Investigative Reporting, Programming, Visual Studio | Tagged , , | 10 Comments

Debugging Optimized Code–New in Visual Studio 2012

For years (decades?) one of the most requested features in Visual C++ has been better support for debugging optimized code. Visual Studio’s debug information is so limited that in a program that consists just of main(argc, argv) the VS debugger … Continue reading

Posted in Programming, Symbols | Tagged , , , , , | 35 Comments

Two Years (and Thousands of Bugs) of Static Analysis

I’ve been running static code analysis on four large code bases for over two years now. After the initial work of looking through all of the warnings and fixing the serious bugs I put the projects into code analysis maintenance … Continue reading

Posted in Code analysis, Code Reliability, Programming, Visual Studio | Tagged , , , | 22 Comments

VC++ /analyze Bug Finder Bug Fixed

Last October I wrote about a crashing bug in the /analyze feature of Microsoft’s VC++ compiler – a use-after-free in their annotation parser. It’s now fixed.

Posted in Code analysis, Code Reliability, Investigative Reporting, Visual Studio | Tagged , , , , | 4 Comments

Visual Studio Single Step Performance Fixes

Single-stepping through code in Visual Studio is usually fast, but sometimes it is torturously painfully slow. When I ran into this recently – twice – I used xperf to find the sources of the slowdowns, and then work around them. … Continue reading

Posted in Investigative Reporting, Visual Studio, xperf | Tagged , , , , , | 15 Comments

Another Bug in Your Bug (Finder): __offsetof

Last month I posted about a crashing bug in Visual Studio 2012’s static code analysis feature.  The irony was delicious. Yesterday I found another bug in the same feature. This one isn’t quite as dramatic, but I found it amusing, … Continue reading

Posted in Code analysis, Code Reliability, Programming, Visual Studio | Tagged , , , , , | 2 Comments