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

varargs handling #364

Closed
robdockins opened this issue Dec 5, 2019 · 0 comments · Fixed by #376
Closed

varargs handling #364

robdockins opened this issue Dec 5, 2019 · 0 comments · Fixed by #376
Labels

Comments

@robdockins
Copy link
Contributor

Currently, crucible-llvm assumes that declaration and call sites for functions will agree about wether a function uses varargs or not. However, it appears that actually clang assumes that call sites need not know if a function is varargs or not; i.e. it assumes that the ABI of varargs functions is compatible with a standard non-varargs function of a particular signature.

This is compounded by the fact that C allows extern functions to be declared without an argument signature; this is interpreted by clang as a varargs function declaration, even though the actual function declaration may be a non-varargs function.

A somewhat more sophisticated approach to function argument matching is required to get this right.

@robdockins robdockins added the llvm label Dec 5, 2019
robdockins added a commit that referenced this issue Dec 10, 2019
…that

are declared as varargs with no fixed argumenst to be considered functions
that take no arguments at all.  This treats the declaration `extern void foo()`
as though it was written `extern void foo(void)` instead.  This isn't actually
correct, but works around most of the problems that otherwise arise from
the SV-COMP benchmark set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant