Conversation

Replying to and
The standard currently implies that optimization based on pointer provenance is not really a thing. It omits talking about it and says nothing about it being undefined. However, compilers do it, and the standard will likely be brought in line with what compilers choose to do.
2
2
Replying to and
Safe Rust code is actually meant to be properly sound and completely well defined / specified. However, unsafe Rust code pretty much just follows the same kind of rules as C based on the LLVM choices. Despite not having a formal spec it's better specified in certain ways though.
1
1
Replying to and
Rust doesn't do TBAA and doesn't really need it due to the &T and &mut T restrictions so that's a lot of complexity that's avoided. It doesn't have the pointer provenance rules but LLVM doesn't really document what they do and my generic wording was lost when they updated it.
2
2
Replying to and
The list there is almost the same as my original list but someone declared it complete/exhaustive when it originally didn't claim that, and the part about aliasing was ruined. Whoever replaced that seemed to miss a lot of the point. Not my problem to resolve though.
1
1
LLVM considers NoAlias to be about lack of memory dependencies between types. That means &T for types without interior mutability (which has to be declared) is NoAlias in the LLVM sense. Also, that list is clearly missing the rules about immutability, among various other things.
1
I thought they renamed the language reference and ruined it. It's something else though. Just look at the language reference instead. This is basically the original docs that I made for this and I had to make assorted language/library changes to fix soundness issues for it.
1
Show replies