by chrisdew · 9y ago · 0 comments
The reason that that doesn't happen, here as elsewhere, is that there are a number of specific compiler optimizations that rely on it being undefined. See GCC's -fwrapv flag.
This article is about attacking the last category.
Unsigned overflow is far less of a problem than signed overflow because it is defined.
It is very cheap to make signed overflow defined. It is more expensive to detect it and fail at runtime.