-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Applying CN to source code with variadic functions always fails. For example
$ cat hi.c
extern int printf (const char *format, ...);
/*@ spec printf(pointer format);
requires true;
ensures true;
@*/
int main (void)
{
printf("Hi world");
return 0;
}
$ cn verify hi.c
cn: internal error, uncaught exception:
File "backend/cn/lib/wellTyped.ml", line 2064, characters 14-20: Assertion failed
Raised at Cn__WellTyped.BaseTyping.infer_expr in file "backend/cn/lib/wellTyped.ml", line 2064, characters 14-38
Called from Cn__Typing.bind.(fun) in file "backend/cn/lib/typing.ml", line 49, characters 17-20
...
Running cn verify --skip=printf hi.c has the same result. Using /*@ trusted; @*/ {} results in error: unsupported variadic functions which is better, but I don't see how to completely skip checking a function including its prototype. Please provide a way to completely skip variadic functions, either by extending trusted or by adding something new such as /*@ skip; @*/.