Defect Detection at Microsoft – Where the Rubber Meets the Road Manuvir Das (and too many others to list) Program Analysis Group Center for Software Excellence.

Slides:



Advertisements
Similar presentations
Advanced programming tools at Microsoft
Advertisements

Formal Specifications on Industrial Strength Code: From Myth to Reality Manuvir Das Principal Researcher Center for Software Excellence Microsoft Corporation.
Taming Win32 Threads with Static Analysis Jason Yang Program Analysis Group Center for Software Excellence (CSE) Microsoft Corporation.
04b | Manage Test Execution (2 of 2) Steven Borg | Co-founder & Strategist, Northwest Cadence Anthony Borton | ALM Consultant, Enhance ALM.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
Interpret Application Specifications
Software Excellence via Program Verification at Microsoft Manuvir Das Center for Software Excellence Microsoft Corporation.
Tom Hollander Solution Architect Solutions Development Centre Microsoft Australia ARC308.
DEV365 Visual Studio Team Edition for Software Architects: Overview Alex Torone Lead Program Manager Enterprise Tools Microsoft Corporation.
Chris Sfanos Program Manager Forefront Client Security Microsoft Session Code: SW17.
Lesson 18: Configuring Application Restriction Policies
PASTE at Microsoft Manuvir Das Center for Software Excellence Microsoft Corporation.
ESupport Shifting Customers to the Internet for Support Published: January 2002.
Symbolic Path Simulation in Path-Sensitive Dataflow Analysis Hari Hampapuram Jason Yue Yang Manuvir Das Center for Software Excellence (CSE) Microsoft.
Introduction to Software Testing
NameTitle Microsoft Corporation. For businesses with Visual Basic 6.0 assets, Visual Basic 2008 is the natural, most productive choice for Windows, Web,
WDK Driver Test Manager. Outline HCT and the history of driver testing Problems to solve Goals of the WDK Driver Test Manager (DTM) Automated Deployment.
Deploying Visual Studio Team System 2008 Team Foundation Server at Microsoft Published: June 2008 Using Visual Studio 2008 to Improve Software Development.
Windows XP Professional Deployment and Support Microsoft IT Shares Its Experiences Published: May 2002 (Revised October 2004)
Enabling Better Software through Better Testing Jason Anderson, Microsoft
Windows Forms in Visual Studio 2005: An Overview Saurabh Pant Program Manager Microsoft Corporation.
A Deep Look at Building Custom Tools on the Microsoft Visual Studio Shell Quan To Program Manager, VS Ecosystem Microsoft Corporation.
4/20/2017 6:38 PM © 2004 Microsoft Corporation. All rights reserved.
Unleashing the Power of Static Analysis Manuvir Das Principal Researcher Center for Software Excellence Microsoft Corporation.
Towards Scalable Modular Checking of User-defined Properties Thomas Ball, MSR Brian Hackett, Mozilla Shuvendu Lahiri, MSR Shaz Qadeer, MSR Julien Vanegue,
Scalable Defect Detection Manuvir Das, Zhe Yang, Daniel Wang Center for Software Excellence Microsoft Corporation.
Using the WDK for Windows Logo and Signature Testing Craig Rowland Program Manager Windows Driver Kits Microsoft Corporation.
資工 4A 陳怡秀 Microsoft Visual Studio’s Journey to Continuous Delivery.
Java: Chapter 1 Computer Systems Computer Programming II.
Building Robust and Reliable Software Jason Anderson, Microsoft
Mark Aslett Microsoft Introduction to Application Compatibility.
Tips & Tricks: Scrubbing Source Code For Common Coding Mistakes (FxCop And PREfast) Nicholas Guerrera TLNL06 Software Design Engineer Microsoft Corporation.
From Quality Control to Quality Assurance…and Beyond Alan Page Microsoft.
Visual Studio 2005 Team System Winning the testing space with advanced testing tools Eric Adams Program Manager Visual Studio 2005 Team System Microsoft.
Chris Menegay VP of Consulting Notion Solutions, Inc. DTL319.
Building More Reliable And Better Performing Web Applications With Visual Studio 2005 Team System Gabriel Marius TLN312 Program Manager Microsoft Corporation.
Project Portfolio Management Business Priorities Presentation.
Chapter 8 Lecture 1 Software Testing. Program testing Testing is intended to show that a program does what it is intended to do and to discover program.
Overview of the Automated Build & Deployment Process Johnita Beasley Tuesday, April 29, 2008.
Exchange Deployment Planning Services Exchange 2010 Complementary Products.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
Rob Davidson, Partner Technology Specialist Microsoft Management Servers: Using management to stay secure.
Giles Davies Testers are from Venus.
Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: ДИАГНОСТИКА ПРИЛОЖЕНИЙ С ПОМОЩЮ ИНСТРУМЕНТОВ VISUAL STUDIO 2012 MAXIM GOLDIN Senior Developer, Microsoft.
Benjamin Naden Windows Client Group Manager, Microsoft Singapore.
Visual Studio 2005 Team System: Enabling Better Software Through Testing Tejasvi Kumar Technology Specialist - VSTS Microsoft Corporation
DEV311 Delving into Visual Studio 2005 Team Edition for Software Testers Ed Glas Group Manager, Web and Load Testing Microsoft Corporation.
Neil Kidd Developer Tools Technical Specialist Microsoft UK.
/ PSWLAB Evidence-Based Analysis and Inferring Preconditions for Bug Detection By D. Brand, M. Buss, V. C. Sreedhar published in ICSM 2007.
Microsoft Corporation. Announcement Visual Studio® Team System 2008 Enables you to Build Quality Code Be More Productive Collaborate at the Next Level.
Internet Explorer 7 Updated Advice for the NHS 04 February 2008 Version 1.3.
Connect with life Tejasvi Kumar Developer Technology Specialist | Microsoft India
Microsoft NDA Material Adwait Joshi Sr. Technical Product Manager Microsoft Corporation.
Unit 9 ITT TECHNICAL INSTITUTE NT1330 Client-Server Networking II Date: 2/17/2016 Instructor: Williams Obinkyereh.
Building Enterprise Applications Using Visual Studio®
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Improving software quality using Visual Studio 11 C++ Code Analysis
TechEd /3/2018 8:11 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /11/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
DAT381 Team Development with SQL Server 2005
Tech·Ed North America /17/2019 6:01 PM
Introduction to VSTS Database Professional
TechEd /7/2019 1:14 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
4/28/2019 6:13 PM HW-889P Advanced driver code analysis techniques Tips and tricks to develop more secure & reliable drivers Dave Sielaff Principal Software.
5/8/2019 3:20 AM bQuery-Tool 3.0 A new and elegant way to create queries and ad-hoc reports on your Baan/Infor ERP LN data. This Baan session is a query.
5/12/2019 2:57 PM © Microsoft Corporation. All rights reserved.
Welcome to Architect Insight 2010
Jamie Cool Program Manager Microsoft
Presentation transcript:

Defect Detection at Microsoft – Where the Rubber Meets the Road Manuvir Das (and too many others to list) Program Analysis Group Center for Software Excellence Microsoft Corporation

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 2 Bottom line Defect detection tools based on program analysis are here to stay A short story on adoption and deployment The target customer is a software developer, not a programmer

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 3 Why me? Program Analysis group this month – Filed bugs – Automatically added 10,000+ specifications – Answered hundreds of s (one future version of one product) We are program analysis researchers – but we live and breathe deployment & adoption – and we feel the pain of the customer

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 4 Defect detection tools based on program analysis are here to stay

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 5 Program analysis is here today … Inter-procedural symbolic evaluation – PREfix: filed bugs this month Inter-procedural path-sensitive dataflow analysis – ESP: filed 500+ bugs this month Intra-procedural abstract interpretation – espX: filed bugs this month Inter-procedural dataflow analysis – SALinfer: added 10,000+ specifications this month

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 6 … and will be here tomorrow Analysis tools are integrated into and enforced in the development process – opening the door for new and better tools developers are adding specifications – opening the door for modular analysis Developers are getting access to extensible analysis tools – opening the door for domain specific tools

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 7 A short story on adoption and deployment

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 8 Longhorn today Monthly central runs of global analysis tools – PREfix, ESP – Defects auto-inserted into central bug database – Bug caps and RI criteria in place – Ranking, filtering, triage, support – Release management drives the bugs – Message suppression in the defect database

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 9 Longhorn today Developer desktop use of local analysis tools – PREfast, espX – Installed and enabled by default for all developers – Tools run incrementally with the build – Defects produce build breaks and errors – RIs are validated and rejected on failure – Message suppression in the source code

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 10 Longhorn today Mandated use of specifications that describe contracts on function interfaces – SAL: Standard Annotation Language – Focus: buffer overruns, pointer usage – Supported by Visual Studio – Windows public headers decorated with SAL

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 11 Longhorn today Central runs + desktop use of automatic specification inference – SALinfer – Run on special branch, results stored on a server – Desktop client queries server and patches code

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 12 Forcing functions for change Gen 1: Manual Review – Too many paths Gen 2: Massive Testing – Inefficient detection of common patterns Gen 3: Global Program Analysis – Stale results Gen 4: Local Program Analysis – Lack of context Gen 5: Specifications

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 13 The target customer is a software developer, not a programmer

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 14 See the big picture You are selling an expensive product – Time is REAL, in the large and the small The customer only cares about the end to end experience – Remember Amdahl’s Law! The customer is always right – Understand, then improve and educate

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 15 Don’t bother doing this without - No-brainer must-haves – Defect viewer, docs, champions, partners A mechanism for developers to teach the tool – Suppression, assertion, assumption A willingness to support the tool A positive attitude

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 16 Understand the customer Software developers are time constrained Software developers have other options Software developers must follow process Feel their pain!

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 17 Myth 1 – Accuracy matters The real measure is Fix Rate Centralized: >50% Desktop: >75% Specification inference – Is it much worse than manual insertion?

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 18 Myth 2 – Completeness matters Complete – find all the bugs There will never be a complete analysis – Partial specifications – Missing code Developers want consistent analysis – Tools should be stable w.r.t. minor code changes – Systematic, thorough, tunable program analysis

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 19 Myth 3 – Developers dislike specifications Control the power of the specifications This will work – Formalize invariants that are implicit in the code This will not work – Re-write code in a different language that is amenable to automated analysis Think like a developer

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 20 Don’t break the shipping code b = a + 16; Use(b); b = __invariant(a) + 16; Use(b); __invariant(a); b = a + 16; Use(b); Before: After (correct code): After (incorrect code): Incorrect usage silently breaks the code!

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 21 Summary Defect detection tools based on program analysis are here to stay A short story on adoption and deployment The target customer is a software developer, not a programmer Where does the rubber meet the road?

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 23 Backup slides

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 24 Generation 1: Manual Review Code reviews, penetration teams Lessons: – Test all the execution paths Environmental changes: – Size of codebase starts to increase

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 25 Generation 2: Massive Testing More testers than developers Massive pre-release testing effort Lessons: – Many bugs follow similar patterns Environmental changes: – Internet changes exposure of interfaces

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 26 Generation 3: Global Analysis Centralized use of PREfix – Inter-procedural symbolic evaluation Lessons: – Ease of fix is the critical criterion – Late results equal stale results Environmental changes: – Security becomes Priority 1

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 27 Generation 4: Local Analysis Desktop use of PREfast – Intra-procedural syntactic & dataflow analysis Lessons: – Lack of context leads to noise – Source code lacks information Environmental changes: – Security becomes Priority 0

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 28 Generation 5: Specifications Annotations on function interfaces + deep local analysis of function implementations Focus: buffer overruns, pointer usage Standard Annotation Language (SAL) – Will be supported by Visual Studio – Will be used to decorate Windows public headers – Interface contracts (preconditions/postconditions) – Extensions to the type system

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 29 SAL Example void foo(pre elementCount(len) int *buf, int len) { … memset(buf, 0, len*sizeof(int)); } int *memset(pre byteCount(len) void *dest, int c, size_t len); Requirement on foo’s callers: must pass a buffer that is len elements long Assumption made by foo: buf is count elements long Requirement on foo: argument buf is len*4 bytes long Requirement on memset’s callers: must pass a buffer that is len bytes long Local Checker: Do the assumptions imply the requirements?

Bugs 05, 6/12/05Manuvir Das, Microsoft Corporation 30 Defect Detection Process