Skip to content
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

Missing warning casting integer pointer -> capability pointer in hybrid? #715

Open
acoplan-arm opened this issue Sep 6, 2023 · 0 comments

Comments

@acoplan-arm
Copy link

I noticed that CHERI-LLVM no longer seems to be warning about casting integer pointers to capability pointers in hybrid. E.g.:

int * __capability f(int *p)
{
    return (int * __capability)p;
}

doesn't seem to provoke any diagnostic. Conversely, a cast in the other direction provokes an error suggesting use of __cheri_fromcap (as expected). I seem to remember that CHERI LLVM used to warn on this (and suggested use of __cheri_tocap). Did this get dropped intentionally, or am I misremembering?

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

No branches or pull requests

1 participant