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
62
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
230
The least you need to know about hashing in Swift
gregheo
0
160
Shared Mutable State
gregheo
0
500
Promises, Futures, and the Shape of Your Code
gregheo
0
66
Shared, Exclusive, Mutable, Immutable
gregheo
0
150
Getting Under Swift’s Skin
gregheo
0
540
Sanitizing Threads for Fun & Profit
gregheo
0
140
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
410
Other Decks in Technology
See All in Technology
巨大モノリスのリプレイス──機能整理とハイブリッドアーキテクチャで挑んだ再構築戦略
zozotech
PRO
0
290
AS59105におけるFreeBSD EtherIPの運用と課題
x86taka
0
270
AWS re:Invent 2025 で頻出の 生成 AI サービスをおさらい
komakichi
3
220
クラスタ統合リアーキテクチャ全貌~1,000万ユーザーのウェルネスSaaSを再設計~
hacomono
PRO
0
150
Greenは本当にGreenか? - B/GデプロイとAPI自動テストで安心デプロイ
kaz29
0
130
AWS Media Services 最新サービスアップデート 2025
eijikominami
0
110
膨大なデータをどうさばく? Java × MQで作るPub/Subアーキテクチャ
zenta
0
120
ABEMAのCM配信を支えるスケーラブルな分散カウンタの実装
hono0130
4
1.1k
個人から巡るAI疲れと組織としてできること - AI疲れをふっとばせ。エンジニアのAI疲れ治療法 ショートセッション -
kikuchikakeru
5
1.9k
IaC を使いたくないけどポリシー管理をどうにかしたい
kazzpapa3
1
150
メッセージ駆動が可能にする結合の最適化
j5ik2o
9
1.5k
AI駆動開発を実現するためのアーキテクチャと取り組み
baseballyama
16
12k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
RailsConf 2023
tenderlove
30
1.3k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Unsuck your backbone
ammeep
671
58k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
For a Future-Friendly Web
brad_frost
180
10k
Navigating Team Friction
lara
190
16k
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