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
I build and test as much code as possible with asan+ubsan. I've found too many bugs in both my code and libraries to trust code review of unsafe programming. But deploying with asan? If I'm willing to trade off that much performance for safety something has gone seriously awry.
1
Also doesn't even do that if you don't configure it a specific way to kill the process when it detects something. It's designed around using a complex debugging runtime generating usable tracebacks etc. and just spewing stuff to logs. Only meant to catch common overflow cases.
1
i.e. designed to have a decent chance that the overflow happens in a way that it can detect it. If an attacker is doing it, they can bypass it. It doesn't outright catch arbitrary read, arbitrary write, etc. but rather OFTEN catches it since it hits red zones / different stuff.
1
Show replies