3 ms·
Ubsan won't catch signed integer overflow unless you happen to hit the overflow case during your tests. Relying on dynamic analysis to catch errors you should h
by nly 12y ago
Ubsan won't catch signed integer overflow unless you happen to hit the overflow case during your tests. Relying on dynamic analysis to catch errors you should have avoided statically is shoddy.
- astrange 12y agoIt's certainly less complete, but it's a little harder to decide what you want to prove statically. If a function must-overflow the optimizer (hopefully) replaces the entire thing with an abort under ubsan, so you could look for that. But that's probably not sensitive enough. And if the function is just 'x + 1' that may-overflow, but it's not important. Maybe you want this: http://pdos.csail.mit.edu/papers/stack:sosp13.pdf http://pdos.csail.mit.edu/papers/stack:sosp13.pdf