Re:Fast integer overflow detection (2012)
by internetisthesh on Sunday December 14, 2014 @03:16PM
(#8749400)
Anyone knows if something like this is available for C++ when using Visual Studio? I just started experiencing issues with this a few days ago when porting my application to x64. Would be nice if it was possible to enable something in debug mode so that an error is triggered if an overflow occur
[ Parent
| on HN ]
Re:Fast integer overflow detection (2012)
by TheLoneWolfling on Sunday December 14, 2014 @03:51PM
(#8749513)
Look at valgrind?
Although I don't know if it works with VS.
Valgrind doesn't do integer overflow checking. In general, it's not even possible to add such checks via binary translation, as on two's complement systems most unsigned and signed operations are compiled to the same machine instruction.