Skip to content

ub_checks::can_dereference does not support reasoning about pointer to unallocated memory #117

Answered by zhassan-aws
QinyuanWu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @QinyuanWu. Yes, unfortunately, this is currently a limitation with can_dereference. Unless the offset is restricted in the harness (but it shouldn't be), the new pointer can go out-of-bounds, and Kani will fail.

The PR that adds an API to check if two pointers are within the same allocation has been merged: model-checking/kani#3583

Once this is available in this repo, you can start using it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by feliperodri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants