quick post about LLVM's new pointer overflow checking: https://blog.regehr.org/archives/1518
-
-
Replying to @johnregehr
Wait does C actually allow you to overflow pointers if they end up back in the same obj?
1 reply 0 retweets 0 likes -
-
Replying to @johnregehr
Thinking of something like https://godbolt.org/g/xX5pZg
3 replies 0 retweets 1 like -
Replying to @Gankro
I declare that this is UB (though the new sanitizer won't catch it)
3 replies 0 retweets 1 like -
Replying to @johnregehr @Gankro
This really can't be UB unless you also want 'int inc = -1; q = p + inc' to be UB.
2 replies 0 retweets 0 likes -
Replying to @stephentyrone @Gankro
not sure I see the parallel, signed and unsigned math are treated differently
1 reply 0 retweets 0 likes -
-
(but: there's no signed or unsigned math in either expression; only pointer math--that's exactly what tripped me up)
2 replies 0 retweets 1 like
It's pointer arithmetic, but with a signed or unsigned operand. Result is defined purely in terms of the value of int operand, not type.
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.