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

Remove hybrid-only error about capability pointer alignment #754

Open
bsdjhb opened this issue Jan 7, 2025 · 0 comments
Open

Remove hybrid-only error about capability pointer alignment #754

bsdjhb opened this issue Jan 7, 2025 · 0 comments

Comments

@bsdjhb
Copy link
Contributor

bsdjhb commented Jan 7, 2025

The error from DiagnoseCHERIPtr() in SemaCast.cpp raises duplicate warnings to -Wcast-align, but only for hybrid, and they can't be disabled via a command line argument. Instead, hybrid code has to use extra workaround casts to defeat the warning (e.g. the extra intermediate cast to void * when casting the Elf_Addr *where to uintcap_t * in the R_MORELLO_RELATIVE handling in CheriBSD's rtld).

The fact that the error is hybrid only seems really odd. I'm not sure if that behavior is intentional, but it is disabled if the pointers being cast between are both capabilities which means it never triggers for purecap, only for hybrid.

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