here we try to guess the value of a pointer -- LLVM says we cannot guess it and GCC suspects we canhttps://godbolt.org/g/SFLwz4
Maybe the valid transform is just that LLVM can assume either the int is a hw address that can't overlap with something usable by malloc...
-
-
if you turn off ASLR you can actually guess the address though :)
-
A transformation that (effectively, as-if principle) changes the address malloc returns seems perfectly valid.
End of conversation
New conversation -
-
-
...or, if it's usable by malloc, that malloc happened not to use it the first time, then the access invoked UB, after which all bets are off
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.