4 ms·
> It was removed in x86_64, likely because it wasn't used much. Well, to be honest (anecdotal data) in my career of programming (with lots of C++), I must say
by amelius 11y ago
> It was removed in x86_64, likely because it wasn't used much.
Well, to be honest (anecdotal data) in my career of programming (with lots of C++), I must say that I can't remember having any actual problems with integer overflow.
But for security (buffer overflow protection), it could be useful.
- nightpool 11y agoRust already has bounds checking on buffers though, so that specific issue isn't a huge concern. However, there is a class of security bugs introduced by bad logic, its just a little more difficult to exploit.
- nitrogen 11y agoWhen doing integer math with medium sized numbers on systems without floating point hardware, I have to be careful to arrange operations so they do not overflow, and sometimes it's still necessary to give up and use a 64-bit type on a 32-bit CPU. An example calculation would be projecting a 3D coordinate into a 2D space.
- prodigal_erik 11y agoIf you don't deliberately send an overflow through every function that does any arithmetic, they could quietly give wrong answers sometimes and I don't see how you'd know that.
- spc476 11y agoIn my career of programming (doing a lot of x86 programming in the late 80s/early 90s) I never saw INTO used, and on modern systems, it's very slow and worse yet, at least under Linux, it's mapped to a SIGSEGV (http://boston.conman.org/2015/09/05.2 http://boston.conman.org/2015/09/05.2).