Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Sanitizing All* The Things
Search
Greg Heo
September 12, 2017
Technology
0
60
Sanitizing All* The Things
Address sanitizer and thread sanitizer. What, why, how?
Greg Heo
September 12, 2017
Tweet
Share
More Decks by Greg Heo
See All by Greg Heo
Concurrency From the Ground Up
gregheo
0
210
The least you need to know about hashing in Swift
gregheo
0
140
Shared Mutable State
gregheo
0
470
Promises, Futures, and the Shape of Your Code
gregheo
0
63
Shared, Exclusive, Mutable, Immutable
gregheo
0
140
Getting Under Swift’s Skin
gregheo
0
530
Sanitizing Threads for Fun & Profit
gregheo
0
130
Thirteen Ways of Looking at a View Controller
gregheo
0
130
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
400
Other Decks in Technology
See All in Technology
Test Smarter, Not Harder: Achieving Confidence in Complex Distributed Systems
eliasnogueira
1
130
これならできる!Kotlin・Spring・DDDを活用したAll in oneのマイクロサービス開発術
demaecan
0
130
おれのAI活用の現状とこれから
tsukasagr
0
120
為什麼我們需要 Observability?
marcustung
0
490
Cursor Meetup Tokyo
iamshunta
5
1.5k
dbt Cloudの新機能を紹介!データエンジニアリングの民主化:GUIで操作、SQLで管理する新時代のdbt Cloud
sagara
0
120
SwiftUI Transaction を徹底活用!ZOZOTOWN UI開発での活用事例
tsuzuki817
1
140
現場で役立つAPIデザイン
nagix
1
190
impressions-trying-lambda-web-adapter
junkishigaki
2
140
単一Gitリポジトリから独立しました
lycorptech_jp
PRO
0
360
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
270
AI Engineering Summit Pre Event LT #10
okaru
2
420
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Become a Pro
speakerdeck
PRO
28
5.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Done Done
chrislema
184
16k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
How GitHub (no longer) Works
holman
314
140k
Facilitating Awesome Meetings
lara
54
6.4k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
Designing for humans not robots
tammielis
253
25k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Transcript
Sanitizing All* The Things tacow / September 2017 / @gregheo
❓ ✋
None
✅
None
‣ ASAN ‣ TSAN
‣ What? ‣ So what? ‣ How? ‣ Show me?
Address Sanitizer allocated buffer unallocated!
‣ Buffer overflows ‣ Subtle bugs ‣ Security vulnerabilities
None
allocated buffer padding shadow memory poisoned poisoned OK
asan_malloc malloc asan_free free Shadow memory check Pointer access
Live Coding!
Address Sanitizer Memory corruption & errors Security & crashes Custom
malloc & free
Thread Sanitizer memory buffer read write
‣ Race conditions ‣ Very subtle and difficult-to-reproduce bugs ‣
Thread mismatch errors
None
‣ Thread ID ‣ Timestamp ‣ Read or write? ‣
Bytes accessed
None
Live Coding!
Thread Sanitizer Data race detector Find race conditions & thread
issues Thread IDs & timestamps
Address Sanitizer Memory corruption & errors Security & crashes Custom
malloc & free
None
@gregheo