Skip to content

Proper use of ub_checks::can_write to check pointer bounds #99

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

You must be logged in to vote

After discussion with @zhassan-aws we will hold off from using ub_checks::can_write in the contract to check the pointer boundary as the kani team is working on a new API that does this job(given a pointer, check whether it is pointing to an address within the allocated memory). The current workaround is to use assume inside the harness to constrain count to avoid pointer out of bound.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@QinyuanWu
Comment options

@zhassan-aws
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by QinyuanWu
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