-
Notifications
You must be signed in to change notification settings - Fork 7
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
Make cheriot_minimum_stack attribute parameter available within the function? #58
Comments
I think the easiest way to support this might be to add |
Clarifying for myself: |
I've got a hard time to find a builtin that is similar to the one you describe (return a const expr which is the value of an attribute of the current function). I think the biggest problem is to have a builtin that depends on the current function. Unfortunately, there is no way in C to have an identifier of the current function. One way to deal with that is preprocessor dirty hacks (override a MIN_STACK macro whom default value is a #error). Probably I didn't look hard enough... |
@v01dXYZ The way I could do this is to add a builtin that codegen's to a constant zero (or maybe ~0) in any function that doesn't have the |
The |
If a function is decorated with
__attribute__((cheri_minimum_stack(x)))
(probably spelled__cheriot_minimum_stack(x)
), it'd be nice if the value ofx
were available within the function body, so that we could feed it to the RAII-drivenStackUsageCheck
objects (probably via convenience macros) so that we didn't have to repeat it all over the place as we do now (seehere, for example, together with all the other uses of
STACK_CHECK
).The text was updated successfully, but these errors were encountered: