thread sanitizer and static analysis€¦ · developer tools #wwdc16 session 412 thread sanitizer...

64
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Help with finding bugs in your code Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer, Program Analysis Team

Upload: others

Post on 13-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Help with finding bugs in your code

Developer Tools #WWDC16

Session 412

Thread Sanitizer and Static Analysis

Anna Zaks Manager, Program Analysis TeamDevin Coughlin Engineer, Program Analysis Team

Page 2: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

What Is This Talk About?

Runtime SanitizersStatic Analyzer

Page 3: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Runtime Sanitizers

Page 4: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Find bugs at run timeSimilar to ValgrindLow overheadWork with Swift 3 and C/C++/Objective-CIntegrated into Xcode IDE

Sanitizers

Page 5: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Address Sanitizer (ASan)

Introduced last yearFinds memory corruption issuesEffective at finding critical bugsNow has full support for Swift

Page 6: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Threading Issues

Hard to consistently reproduceDifficult to debug Lead to unpredictable results

Page 7: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Thread Sanitizer (TSan) NEW

Page 8: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Thread Sanitizer (TSan) NEW

Use of uninitialized mutexesThread leaks (missing pthread_join)Unsafe calls in signal handlers (ex: malloc)Unlock from wrong threadData races

Page 9: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

DemoThread Sanitizer in Xcode

Page 10: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Thread Sanitizer (TSan) in Xcode

1. Edit Scheme – Diagnostics tab2. “Enable Thread Sanitizer” checkbox3. Build and Run4. View all of the generated runtime issues5. Can choose to break on every issue

Page 11: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

TSan Build Flow

clang

swift

TSan dylib

Page 12: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Usage from Command-Line

Compile and link with TSan$ clang -fsanitize=thread source.c -o executable

$ swiftc -sanitize=thread source.swift -o executable

$ xcodebuild -enableThreadSanitizer YES

Stop after the first error$ TSAN_OPTIONS=halt_on_error=1 ./executable

Page 13: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Platform Support for TSan

64-bit macOS64-bit iOS and tvOS simulators

No device supportNo watchOS support

Page 14: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Fixing Data Races

Page 15: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Data Race

Multiple threads access the same memory without synchronization At least one access is a writeMay end up with any value or even memory corruption!

Page 16: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Reasons for Data Races

Can indicate a problem with the structure of your programOften means that synchronization is missing

Page 17: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Data Race Example

var data: Int? = nil func producer() { // More code here. data = 42 }

func consumer() { // More code here. print(data) }

Page 18: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Data Race Example

var data: Int? = nil

func producer() { // More code here. data = 42 dataIsAvailable = true }

func consumer() { // More code here.   while !dataIsAvailable { usleep(1000) } print(data) }

Order is not guaranteed

Page 19: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Data Race Example

var data: Int? = nil

func producer() { // More code here. serialDispatchQueue.async { data = 42 } }

func consumer() { // More code here. serialDispatchQueue.sync { print(data) } }

Page 20: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Data Race in Lazy Initialization Code

Both threads could be setting the value at the same time

Singleton *getSingleton() { static Singleton *sharedInstance = nil;

if (sharedInstance == nil) { sharedInstance = [[Singleton alloc] init]; } return sharedInstance; }

Page 21: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Data Race in Lazy Initialization Code

Use-after-free in ARC and object is leaked on a race in MRRUnsynchronized read

Singleton *getSingleton() { static Singleton *sharedInstance = nil; if (sharedInstance == nil) {   Singleton *localObject = [[Singleton alloc] init]; // Only assign if sharedInstance is still nil. atomic_compare_and_set(&sharedInstance, nil, localObject); } return sharedInstance; }

Page 22: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Data Race in Lazy Initialization CodeSingleton *getSingleton() { static dispatch_once_t predicate; static Singleton *sharedInstance = nil; dispatch_once(&predicate, ^{ sharedInstance = [[self alloc] init]; }); return sharedInstance; }

Page 23: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Lazy Initialization in Swift

Global variables var sharedInstance = Singleton()

func getSingleton() -> Singleton {

return sharedInstance

}

Class constants class Singleton {

static let sharedInstance = Singleton()

}

Page 24: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Choosing the Right Synchronization API

Concurrent Programming With GCD in Swift 3 Pacific Heights Friday 4:00PM

1. Use GCD Dispatch racy accesses to the same serial queue

2. Use pthread API, NSLockpthread_mutex_lock() to synchronize accesses

3. New os_unfair_lock (use instead of OSSpinLock)4. Atomic operations

Page 25: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

There is No Such Thing as a “Benign” Race

On some architectures (ex., x86) reads and writes are atomicBut even a “benign” race is undefined behavior in CMay cause issues with new compilers or architectures

Page 26: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,
Page 27: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Behind the Scenes

Page 28: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

For every access:• Records the information about that access• Checks if that access participates in a race

Compiler Instruments Memory Accesses

*p = ‘a’; RecordAndCheckWrite(p);

*p = ‘a’;

Page 29: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Th3 : th3_1 : ReadTh2 : th2_1 : ReadTh1 : th1_1 : WriteTh1 : th1_2 : WriteTh3 : th3_2 : Read

TSan Shadow State Tracks Up to 4 Accesses

Th4 : th4_1 : Read‘a’

Thread 1 Thread 2 Thread 3 Thread 4

Shadow state:Up to four 8 byte objects

Application memory: 8 bytes

Another Shadow Cell is EvictedRecord Information About Memory Accesses

0xb009

Page 30: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Detecting a Race

Every thread stores (in thread local):• Thread’s own timestamp • The timestamps for other threads that

establish the points of synchronization• Timestamps are incremented on every

memory access

Thread 1

th1_0

th2_0th3_0

Thread 2

th2_0

th1_0th3_0

Thread 3

th3_0

th1_0th2_0

th2_22 th3_55th1_2

Page 31: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Thread 1

th2_0th3_0

Thread 2

th1_0th3_0

Thread 3

th1_0th2_0

th2_22 th3_55th1_2

Page 32: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

th2_22th2_23

Thread 1 Writes

th2_0th3_0

th1_0th3_0

th3_55th1_0th2_0

Th1 : th1_3 : Writelock

th1_3

th1_2

Th2 : th2_23 : WriteTh3 : th3_56 : Write

th1_3 th3_56

th1_3vector clocks

Thread 2 WritesThread 3 Writes: Check for Races: Check for Races

Thread 1 Thread 2 Thread 3

‘c’‘b’‘a’0xb009

Detecting a Race

th2_23

Page 33: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Thread Sanitizer

Timing does not matterCan detect races even if they did not manifest during the particular runThe more run time coverage the betterRun all your tests with TSan!

Page 34: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Thread Sanitizer

Page 35: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Finding Bugs with Static Analysis

Page 36: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Find Bugs Without Running Code

Does not require running code (unlike sanitizers)Great at catching hard to reproduce edge-case bugsSupported only for C, C++, and Objective-C

Page 37: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Localizability

NEW

Instance Cleanup

NEW

Nullability

NEW

Page 38: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Missing Localizability

Page 39: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Startling for Users

Page 40: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

DemoClang Static Analyzer in Xcode

Page 41: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Clang Static Analyzer in Xcode

1. Product > Analyze orProduct > Analyze “SingleFile.m”

2. View in Issue Navigator3. Explore Issue Path

Page 42: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Find Missing Localizability

Find unlocalized user-facing string:

[button setTitle:@“Cancel”];

Find missing localization context comment:

NSString *t = NSLocalizedString(@“Cancel”, nil);

Page 43: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Enable Checks in Build Settings

Page 44: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Checking -dealloc inManual Retain/Release

Page 45: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Do Not Release ‘assign’ Properties

Release of synthesized ivar in -dealloc is over-release:

@property(assign) id delegate;

-(void)dealloc { [_delegate release];

[super dealloc]; }

Page 46: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Do Release ‘retain/copy’ Properties

Leak if no release of ivar for retain/copy property in -dealloc:

@property(assign) id delegate; @property(copy) NSString *title; -(void)dealloc {

[super dealloc]; }

Page 47: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Update to Automated Reference Counting

Page 48: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Nullability Violations

Page 49: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Nullability Annotations

Indicate whether a value is expected to be nil:@interface CLLocation : NSObject

@property(readonly, nonnull) NSDate *timestamp;

@property(readonly, nullable) CLFloor *floor;

Page 50: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Why Annotate Nullability?

New programming model communicates expectation to callersViolation can cause crashes or other unexpected behaviorSwift enforces model in type system with optionalsclass CLLocation : NSObject {

public var timestamp: NSDate { get }

public var floor: CLFloor? { get }

}

Page 51: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Finding Nullability Violations

Particularly useful in mixed Swift/Objective-C projectsLogical problem in codeIncorrect annotations

Page 52: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Violation: Branching with nil Default

- (nonnull NSString *)shortDescription { NSString *name = nil;

if (self.cityName) name = self.cityName; if (self.countryName) name = self.countryName;

return name; }

Page 53: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Violation: Branching with nil Default

- (nonnull NSString *)shortDescription { NSString *name = NSLocalizedString(@“Earth”, @“The planet”);

if (self.cityName) name = self.cityName; if (self.countryName) name = self.countryName;

return name; }

Page 54: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Violation: Incorrect Annotation

NS_ASSUME_NONNULL_BEGIN @property(readonly) PressureData *pressure; NS_ASSUME_NONNULL_END

- (PressureData *)pressure { if ([self hasBarometer]) return [self measurePressure];

return nil; }

Page 55: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Violation: Incorrect Annotation

NS_ASSUME_NONNULL_BEGIN @property(readonly, nullable) PressureData *pressure; NS_ASSUME_NONNULL_END

- (PressureData *)pressure { if ([self hasBarometer]) return [self measurePressure];

return nil; }

Page 56: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Nullability of Your API is a Contract

Do not change just to silence the analyzer

Do carefully consider nullability of API

Page 57: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Suppress with Cast

Return nil defensively for backwards compatibility: - (NSString * _Nonnull)stringAtIndex:(int) index {

if (index < 0 || index >= _count)

return (NSString * _Nonnull)nil;

}

Page 58: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Static Analyzer

Page 59: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Wrapping Up

Page 60: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

These Tools Find Real Bugs!

Address Sanitizer and Thread SanitizerClang Static AnalyzerUse on your code!

Page 61: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

More Information

https://developer.apple.com/wwdc16/412

Page 62: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Related Sessions

Internationalization Best Practices Mission Tuesday 9:00AM

Visual Debugging with Xcode Presidio Wednesday 4:00PM

Debugging Tips and Tricks Pacific Heights Friday 1:40PM

Using Time Profiler in Instruments Nob Hill Friday 3:00PM

Concurrent Programming with GCD in Swift 3 Pacific Heights Friday 4:00PM

Page 63: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,

Labs

Thread Sanitizer, Static Analysis, andLLVM Compiler Lab Developer Tools Lab B Thursday 12:00PM

Thread Sanitizer, Static Analysis, andLLVM Compiler Lab Developer Tools Lab C Friday 3:00PM

LLVM Compiler, Objective-C, and C++ Lab Developer Tools Lab C Friday 4:30PM

GCD Lab Frameworks Lab D Friday 5:00PM

Page 64: Thread Sanitizer and Static Analysis€¦ · Developer Tools #WWDC16 Session 412 Thread Sanitizer and Static Analysis Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer,