Conversation

Question for Rust people: when you use a C library, and you write a safe interface around it, is it common to build that C library with AddressSanitizer? (if not, why not?)
7
8
Replying to and
Yep, this is why I wouldn't - it's not a security feature, nor a hardening measure. It's a sanitizer designed only for testing/fuzzing, and optimized for performance at the expense of correctness and safety.
1
2
Other than sequential overflows, at least, but I would recommend even using it for that... It's entirely sensible to compile C code with instrumentation to give it coarse inter-object memory safety if you're willing to pay a huge perf cost. Not at all what ASan provides though.
1
I think that's a compelling feature. Most other people don't agree and there isn't enough interest for there to be an implementation in GCC or LLVM. There are papers about it and experimental / dangerous non-production proof of concepts but nothing actually usable / upstream yet.
1
Show replies