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

Function pointer comparison apparently not supported #746

Open
lennartberinger opened this issue Nov 21, 2023 · 0 comments
Open

Function pointer comparison apparently not supported #746

lennartberinger opened this issue Nov 21, 2023 · 0 comments

Comments

@lennartberinger
Copy link
Collaborator

Given a function pointer f specified by func_ptr or func_ptr', it does not appear
possible to write a C program that tests f against NULL, as in "if (f) { foo } else { bar}":
the spatial clause of func_ptr' is emp while verifying the comparison needs
"valid_pointer f" (to establish denote_tc_test_eq f nullval").
CompCert 3.13 correctly sets the permission of the function's address to Nonempty
in line 654 of https://github.com/AbsInt/CompCert/blob/3.13/common/Globalenvs.v,
so this is likely a shortcoming of VST's construction of the resources associated with this address.

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