Finding and fixing memory safety bugs in C with ASAN
summary
AddressSanitizer (ASAN) is integrated into CRuby so building with AddressSanitizer (ASAN) is documented in building ruby.md, compiles, and passes the test suite on the maintainer’s machine, but costs 2–5x runtime and needs tweaks: the GC learns about ASAN’s fake stacks, Ruby’s allocator uses ASAN poisoning calls, and historic callcc support is callcc disabled under ASAN. Running tests with ASAN finds very few real memory bugs so far (two minor cases), and CI/nightly ASAN and further sanitizers are planned.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:12What is AddressSanitizer
- 5:45Where ASAN fits
- 9:01How ASAN works
- 13:38ASAN in CRuby
- 20:20Existing bugs found
- 21:44Next steps for ASAN
- 25:41Key takeaways
- 27:06ASAN vs Valgrind
related talks
40mAddressSanitizer, or How to Make C/C++ Programs More Reliable and Secure
49mTeaching Containers and Allocators How to Sanitize Addresses
01h 02mSanitize your C++ code
33mFuzzing Ruby and C Extensions
59mBeyond Sanitizers...
41mDetect C++ Memory Leaks with ALSan: Attachable Leak Sanitizer
01h 00mSanitize for your Sanity: Sanitizers tools for Modern C++
01h 06mmemory-safe C++
