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

C global variables "temporarily unsupported" #1042

Closed
andrewj-brown opened this issue Jun 22, 2023 · 2 comments · Fixed by #1047
Closed

C global variables "temporarily unsupported" #1042

andrewj-brown opened this issue Jun 22, 2023 · 2 comments · Fixed by #1047
Labels
A-Enh Enhancement F-C Frontend: C

Comments

@andrewj-brown
Copy link

I'm interested in verifying C programs for information flow security, and it's rather difficult to provide useful examples without the use of global variables.

From what I can glean so far, there appears to be an error in constructing the AST, where it assumes "declarators" always have parameters (or their inner types have parameters, for arrays and pointers).

How difficult of a fix is this likely to be? I may be able to attempt it, but it looks like it might involve going through many levels of the parser to convince it that parameter-less expressions are ok in a top-level context.

@pieter-bos pieter-bos added A-Enh Enhancement F-C Frontend: C labels Jun 22, 2023
@pieter-bos pieter-bos linked a pull request Jun 23, 2023 that will close this issue
@pieter-bos
Copy link
Member

I've resolved this on the dev branch. You should be able to treat them as any other heap location now, see e.g. here: https://github.com/utwente-fmt/vercors/blob/dev/examples/concepts/clang/c-example-use.c.

@andrewj-brown
Copy link
Author

Wow, that was quick! That's fantastic, thanks heaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Enh Enhancement F-C Frontend: C
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants