-
Notifications
You must be signed in to change notification settings - Fork 42
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
Labels
Comments
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
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 actuallyclang
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 byclang
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.
The text was updated successfully, but these errors were encountered: