News for hackers. Stuff that matters.
Re:Signed Integers Are Two’s Complement by caf on Thursday May 31, 2018 @12:09AM (#17193876)
However it also prevents "abort on overflow" implementations from being conforming, which look like a much better way of finding actual overflow bugs in the code.
Re:Signed Integers Are Two’s Complement by mort96 on Thursday May 31, 2018 @03:18AM (#17194555)
Do such implementations currntly only abort on signed overflow and not on unsigned overflow? Aborting on unsigned overflow is currently not conforming, is it?
Re:Signed Integers Are Two’s Complement by scatters on Thursday May 31, 2018 @03:33AM (#17194618)
It is not conforming, which is why `-fsanitize=unsigned-integer-overflow` is not enabled by default by ubsan. However it is available if you want to try it.
Re:Signed Integers Are Two’s Complement by DoofusOfDeath on Thursday May 31, 2018 @01:05AM (#17194090)
That's a question of static vs. dynamic analysis for bug detection.

Which one(s) is/are most useful depends on the user's needs.

Re:Signed Integers Are Two’s Complement by simias on Thursday May 31, 2018 @03:16AM (#17194549)
Static analysis was always possible, dynamic isn't if you want to remain standard-compliant and overflow is defined.

That being said I think it's a rather weak justification for making overflow UB, after all if you want to trap on overflows wouldn't want to catch unsigned overflow as well?