Security professionals who cannot write a correct integer overflow / pointer overflow check remind me of arsonist firefighters.
-
-
how is LLVM doing wrt recognizing portable checks?
-
Also failing I think. Most important one is a>TYPE_MAX/b. Trivial to opt as mul+cc check.
-
can you give a gcc explorer link? I can try to fix
-
On mobile browser atm but just int f(unsigned a,unsigned b) {return a>UINT_MAX/b;}
-
btw LLVM and GCC both already emit pretty good code for thispic.twitter.com/44LMxlYX1D
-
That's a buggy test; it assumes long is twice as wide as int.
-
Even if you fix that detail using right types, it assumes _existence_ of a double-width type...
-
..which is false for size_t on a 64-bit system.
- 5 more replies
New conversation -
-
-
i wasn't gonna reply bc i thought it's too obvious…
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.