You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suppose the cause of failure is that __builtin_va_arg(p, int) is statically rewritten to va_args[j] where va_args is the build-in array of arguments. However, after havocing, p becomes a nondet pointer; hence __builtin_va_arg(p, int) cannot be correctly rewritten (and will be rewritten to symex::invalid_object!0#0 as an example).
To resolve the issue, we could rewrite __builtin_va_arg(p, int) to
check if p is the same object as va_args: assert(same_object(p,va_args))
check if the offset of p is valid: assert(offset(p) < object_size(va_args))
substitute __builtin_va_arg(p, int) with (int)(*p)
The text was updated successfully, but these errors were encountered:
CBMC version: 5.67.0
Operating system: N/A
For the following program:
CBMC fails to prove that the invariant preserves.
I suppose the cause of failure is that __builtin_va_arg(p, int) is statically rewritten to va_args[j] where va_args is the build-in array of arguments. However, after havocing, p becomes a nondet pointer; hence __builtin_va_arg(p, int) cannot be correctly rewritten (and will be rewritten to symex::invalid_object!0#0 as an example).
To resolve the issue, we could rewrite __builtin_va_arg(p, int) to
The text was updated successfully, but these errors were encountered: