Hacker News new | ask | show | jobs
by internetisthesh 4202 days ago
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
1 comments

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.
Valgrind doesn't work on windows.