News for hackers. Stuff that matters.
Re:Efficient Integer Overflow Checking in LLVM by chrisseaton on Saturday April 09, 2016 @10:00PM (#11464487)
That'll badly pollute your control flow graph though. You'll have a branch and a later merge for every SafeAddInts you do. Implicit handling of overflow with some kind of trap avoid this.
Re:Efficient Integer Overflow Checking in LLVM by anon4 on Sunday April 10, 2016 @03:02AM (#11465247)
It's no worse than checking return codes though. And I really don't want integer overflow check to be turned on for all integers. I'm writing stuff that has to run, even if it occasionally produces a wrong answer. Having hidden checks inserted by the compiler that just crash the program would be really bad. Yes, I should check the inputs, but if I ever forget to check one, it's better that some ranges of input data produce nonsense results rather than crashes.