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 am using CBMC version 6.4.1 on macOS (ARM64) and encountered an issue where CBMC ignores__CPROVER_is_cstring().
I expected CBMC to enforce that input is a valid null-terminated string, but instead, I received the following warning:
warning: ignoring is_cstring
This seems to indicate that __CPROVER_is_cstring() is not being applied, which affects how CBMC explores symbolic string inputs.
Minimal Reproducible Example
Here is a simplified C program that should trigger a failure if the input starts with "HI":
#include<assert.h>#include<stdio.h>#include<string.h>// Function that processes inputvoidprocess_input() {
charinput[10];
// Assume input is a valid C string__CPROVER_assume(__CPROVER_is_cstring(input));
// Fail if input starts with "HI"if (input[0] =='H'&&input[1] =='I') {
assert(0); // Force CBMC to find failing input
}
}
// Harness function for CBMCvoidharness() {
process_input();
}
Description
I am using CBMC version 6.4.1 on macOS (ARM64) and encountered an issue where CBMC ignores
__CPROVER_is_cstring()
.I expected CBMC to enforce that
input
is a valid null-terminated string, but instead, I received the following warning:This seems to indicate that
__CPROVER_is_cstring()
is not being applied, which affects how CBMC explores symbolic string inputs.Minimal Reproducible Example
Here is a simplified C program that should trigger a failure if the input starts with
"HI"
:Command Used
Unexpected Behavior
CBMC does not enforce
__CPROVER_is_cstring()
input
is null-terminated and allow proper symbolic string generation.Workaround using
strlen()
instead of__CPROVER_is_cstring()
--unwind
to avoid issues withstrlen()
being treated as a loop.The text was updated successfully, but these errors were encountered: