We continue checking Microsoft projects: analysis of PowerShell

It has become a “good tradition” for Microsoft to make their products open-source: CoreFX, .Net Compiler Platform (Roslyn), Code Contracts, MSBuild, and other projects. For us, the developers of PVS-Studio analyzer, it’s an opportunity to check well-known projects, tell people (including the project authors themselves) about the bugs we find, and additionally test our analyzer. Today we are going to talk about the errors found in another project by Microsoft, PowerShell.

4214_powershell20blore-logo_png-550x0

Continue reading

Fun and Bugs in Microsoft Word 1.1a

The Microsoft company made a present to all programmers eager to dig into some interesting stuff: they opened the source codes of MS-DOS v 1.1, v 2.0 and Word for Windows 1.1a. The MS-DOS operating system is written in an assembler, so the analyzer cannot be applied to it. But Word is written in C. Word 1.1a’s source codes are almost 25 years old, but we still managed to analyze it. There’s no practical use of it, of course. Just for fun.

hqdefault

Continue reading

Analysis of .NET Core Libraries (CoreFX)

About a year ago Microsoft made the CoreCLR and CoreFX source code open. The latter project wasn’t of a big interest to us until recently, as it was written in C#, not in C++. But with the release of PVS-Studio 6.00 that now supports C# I decided to go back to the CoreFX and write an article about its analysis.

1e93eu Continue reading

Why Windows 8 drivers have so many bugs

We have checked the Windows 8 Driver Samples pack with our PVS-Studio analyzer and found various bugs in its samples. There is nothing horrible about it – bugs can be found everywhere, so the title of this article may sound a bit high-flown. But these particular errors may be really dangerous, as it is a usual practice for developers to use demo samples as a basis for their own projects or borrow code fragments from them.

r1yl0r5

Continue reading

“Why is there no artificial intelligence yet?” Or, analysis of CNTK tool kit from Microsoft Research.

Microsoft have given open access to the source code of a tool kit that is used in the company to speed up the development of artificial intelligence: Computational Network Toolkit is now available at Github. The developers had to create their own custom solution, because the existing tools did not work fast enough.

Let’s have a look at the analysis results of the source code of this project, as done by our static code analyzer.

1e4e9l

Continue reading

PVS-Studio: 25 Suspicious Code Fragments in CoreCLR

The Microsoft Corporation has recently published, for free, access the source code of the CoreCLR engine, which is a key component of .NET Core. We couldn’t help but pay attention to this event. The wider a project’s audience is, the worse defects found in the code will seem, won’t they? Despite Microsoft themselves being the authors of the product, there are still some issues to examine and think over in their code – just like in any other large project.

image1 Continue reading