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
42
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
130
The least you need to know about hashing in Swift
gregheo
0
90
Shared Mutable State
gregheo
0
290
Promises, Futures, and the Shape of Your Code
gregheo
0
41
Shared, Exclusive, Mutable, Immutable
gregheo
0
91
Getting Under Swift’s Skin
gregheo
0
510
Sanitizing Threads for Fun & Profit
gregheo
0
89
Thirteen Ways of Looking at a View Controller
gregheo
0
120
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
290
Other Decks in Technology
See All in Technology
事業部を超えた 開発生産性向上に挑戦する
kentakozuka
5
930
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
7
100k
あらゆる商品を扱う商品データベースを再設計した話 / product db re-architecture
rince
8
3.4k
大規模なアジャイル開発の現場と技術負債 / Technical Debt
yoshiitaka
20
4k
沒想過的前端錯誤處理可能比你有做的還多
line_developers_tw
PRO
0
1.9k
『QAという人』が必要ではなく、『QAという技術』が必要
sadonosake
2
460
技術広報経験0のEMがエンジニアブランディングをはじめてみた
coconala_engineer
1
130
生成AIの不確実性と向き合うためのオブジェクト指向設計
tkikuchi1002
2
340
10分でわかるfreeeのQA
freee
0
220
戦略的DDDを実践するための跳躍力 / OOC 2024
pictiny
6
3.4k
マイクロサービス環境におけるDB戦略 in DMMプラットフォーム
pospome
11
3k
Getting started with controlling LEGO using Swift
hcrane
0
120
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
8
8.2k
GraphQLとの向き合い方2022年版
quramy
28
12k
We Have a Design System, Now What?
morganepeng
42
6.7k
How STYLIGHT went responsive
nonsquared
92
4.7k
GraphQLの誤解/rethinking-graphql
sonatard
48
9.1k
The Language of Interfaces
destraynor
150
22k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
242
20k
Product Roadmaps are Hard
iamctodd
43
9.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
57
14k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
Statistics for Hackers
jakevdp
789
220k
Into the Great Unknown - MozCon
thekraken
10
830
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