~/talk

Teaching Containers and Allocators How to Sanitize Addresses

Talkat CppNorth 2023 · 2023-07-17..07-19· [c-and-cpp, security]
links:none on file
slides:none on file

Explains how AddressSanitizer’s runtime API lets containers and allocators mark unused bytes so ASAN catches out-of-bounds and use-after-free that plain allocation misses. Shows a hand-rolled vector that calls asan_poison_memory_region and asan_unpoison_memory_region, uses annotate_contiguous_container for nicer diagnostics, and adds checks via asan_region_is_poisoned in unit tests. Covers shadow-memory layout, 8-byte alignment rules, quarantine reuse, allocator gotchas, and performance costs (roughly 2× to 8× slowdown); the integration works when tested.

AI-written summary · about

  1. 0:00Introduction to Asan
  2. 3:45How Address Sanitizer works
  3. 10:11Implementing custom containers
  4. 23:22Advanced container techniques
  5. 34:54Container annotation API
  6. 40:00Limitations and best practices
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.