Skip to content

Extend bounds inference to handle relative alignment. #327

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

Open
secure-sw-dev-bot opened this issue Jan 16, 2022 · 0 comments
Open

Extend bounds inference to handle relative alignment. #327

secure-sw-dev-bot opened this issue Jan 16, 2022 · 0 comments

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc-clang#328


We need to make sure that bounds inference properly handles bounds with relative alignment. In addition, we need to introduce relative alignment requirements at casts of array_ptrs.

Normally we can omit relative alignment in a bounds declaration for some array_ptr. It is assumed to be T. So first we face the question of whether to always make relative alignment explicit during bounds inference.

Second, when a pointer p with some type array_ptr is cast to have type array_ptr, p retains its original relative alignment. If no relative alignment has been specified for p, than its relative alignment is sizeof(T).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant