@CopperheadSec @RichFelker Conforming code or not, the compiler assumes signed overflow does not happen, correct?
-
-
Replying to @cr1901
@cr1901@RichFelker Yes, unless you pass -fwrapv for two's complement signed arithmetic (or -fno-strict-overflow which can be less strict).1 reply 0 retweets 0 likes -
Replying to @CopperheadOS
@CopperheadSec@RichFelker Ahhh, brings back memories of -mtune vs -march and -ffreestanding not actually working on hosted compilers.1 reply 0 retweets 0 likes -
Replying to @cr1901
@cr1901@RichFelker For hardening, -fwrapv works in global CFLAGS with -fno-wrapv -fsanitize=signed-integer-overflow for special cases.2 replies 0 retweets 0 likes -
Replying to @CopperheadOS
@CopperheadSec@cr1901 I write to the actual language, so I don't use -fwrapv. Anything needing it is a bug in my book.1 reply 0 retweets 0 likes -
Replying to @RichFelker
@RichFelker@cr1901 It's a bad idea to depend on it while writing code but it works well as a distribution hardening switch.2 replies 0 retweets 1 like -
Replying to @CopperheadOS
@RichFelker@cr1901 Since there's a lot of bad code using incorrect signed overflow checks that can be optimized out, etc.1 reply 0 retweets 0 likes -
Replying to @CopperheadOS
@RichFelker@cr1901 And -fwrapv really has no performance cost in the real world. It only helps on stuff like SPEC (which it breaks!).2 replies 0 retweets 0 likes -
Replying to @CopperheadOS
@RichFelker@cr1901 Better to enable -fsanitize=signed-integer-overflow if you're willing to take a performance hit... but breaks too much.1 reply 0 retweets 0 likes -
Replying to @CopperheadOS
@CopperheadSec@cr1901 Anything that it "breaks" in inducing a hard crash in could have silent runaway wrong behavior on modern compilers.1 reply 0 retweets 0 likes
@CopperheadSec @cr1901 I'd rather see all this software start (controlled) crashing and get fixed. :-)
-
-
Replying to @RichFelker
@RichFelker@cr1901 Definitely, it's just a lot of work and most projects aren't responsive to those kinds of patches.0 replies 0 retweets 0 likesThanks. 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.