5 ms·
Integer overflow on the JVM has defined behaviour, so it's not the security issue that it is in C.
by lmm 10y ago
Integer overflow on the JVM has defined behaviour, so it's not the security issue that it is in C.
- caf 10y agoIt's wasn't the undefined-ness of the overflow that was the problem here - the bugs would have been exactly the same if 2s complement wrapping overflow had been mandated. So these would still have been bugs under the JVM too - crashing from an out-of-bound array access or failing to allocate a stupendously large number of objects. The JVM would stop them from turning into potential arbitrary code execution, though (as some, but not all, of these bugs did).