The case for integer overflow checks?

Guillaume Piolat contact at spam.com
Mon Sep 18 11:30:22 UTC 2017


On Monday, 18 September 2017 at 08:27:21 UTC, Jonathan M Davis 
wrote:
>
> If you care about having the overflow checks

On Monday, 18 September 2017 at 08:27:21 UTC, Jonathan M Davis 
wrote:
>
> Personally, I've never had a need for checked ints. I've rarely 
> seen code that would care, and when you do, it's usually pretty 
> easy to deal with it properly. But Checked is there for those 
> who feel the need.

That we don't feel the need or care doesn't mean the problem 
doesn't exist. That's why I gave an example that I always felt 
was safe ( malloc(w*h)) but wasn't.

I'd wager no native programmer feel the need for overflow checks 
or Checked!int, that's why we have security problems in the first 
place.


More information about the Digitalmars-d mailing list