Conversation

Replying to
it's also one of those things where like, basically *every* pointer offset llvm ever messes with is `inbounds` so random shit might just require it because it makes things easier and no one cares about non-inbounds codegen
1
1
Replying to
oh yeah i, yep -- i am now remembering spending way too much time worrying about overflowing pointer shit in the stdlib for exactly 32-bit and shit like PAE
1
1
Replying to and
but yeah llvm *extremely* pervasively assumes pointer offsets fit into an isize without overflow so it's generally "safe" to assume no one ever creates such an allocation because it would break so extremely bad -- certainly the rust stdlib avoids ever generating such an alloc
1
3
Also, too hard to avoid doing x-y everywhere which would be undefined even with a looser interpretation of the standard not assuming this is handled by the runtime. Runtime must not put allocation at 0 or size::MAX and needs to enforce isize::MAX size. GCC/LLVM both assume this.
1