-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kani does not support fat pointer comparison #327
Comments
Note to myself: We need to compare the data field and, potentially, the metadata. Need to double check the latter. |
Lowering the priority since this has been mitigated. |
I'm looking into this issue right now, but it is still not clear to me what the actual semantics of pointer comparison is for Rust. Even for thin pointers it isn't clear. Interesting enough, the standard library does support Eq and Ord of raw pointers and the compiler behavior is somewhat deterministic (not clear if the LLVM portion is though). I'll keep digging. Here are some interesting references: |
From this discussion in the zulip tlang channel, it seems that pointers with the same provenance, we should be able to do the following:
However, the vtable pointer has a few caveats.
So I propose the following solution.
We should also defer implementing comparison between pointers with different provenance. This behavior is also not well defined. |
RMC crashes on the core Rust test (
src/test/ui/raw-fat-ptr.rs
).After minimizing:
The text was updated successfully, but these errors were encountered: