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
58
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
180
The least you need to know about hashing in Swift
gregheo
0
120
Shared Mutable State
gregheo
0
400
Promises, Futures, and the Shape of Your Code
gregheo
0
59
Shared, Exclusive, Mutable, Immutable
gregheo
0
140
Getting Under Swift’s Skin
gregheo
0
520
Sanitizing Threads for Fun & Profit
gregheo
0
120
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
370
Other Decks in Technology
See All in Technology
20250122_FinJAWS
takuyay0ne
2
340
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
140
タイミーのデータ活用を支えるdbt Cloud導入とこれから
ttccddtoki
2
460
Mocking your codebase without cursing it
gaqzi
0
140
アクセシブルなマークアップの上に成り立つユーザーファーストなドロップダウンメニューの実装 / 20250127_cloudsign_User1st_FE
bengo4com
1
1.1k
データ基盤におけるIaCの重要性とその運用
mtpooh
5
790
Enhancing SRE Using AI
yoshiiryo1
1
120
現実的なCompose化戦略 ~既存リスト画面の置き換え~
sansantech
PRO
0
140
大学教員が押さえておくべき生成 AI の基礎と活用例〜より効率的な教育のために〜
soh9834
1
170
Tech Blog執筆のモチベート向上作戦
imamura_ko_0314
0
620
サーバレスの未来〜The Key to Simplifying Everything〜
kawaji_scratch
2
330
第27回クラウド女子会 ~re:Invent 振り返りLT会~ 宣言型ポリシー、使ってみたらこうだった!
itkr2305
0
270
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
590
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
6
210
A designer walks into a library…
pauljervisheath
205
24k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Unsuck your backbone
ammeep
669
57k
GraphQLとの向き合い方2022年版
quramy
44
13k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
980
Embracing the Ebb and Flow
colly
84
4.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.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