Skip to content

Field sensitivity appears to have broken display of counterexamples #4882

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

Closed
hannes-steffenhagen-diffblue opened this issue Jul 8, 2019 · 1 comment

Comments

@hannes-steffenhagen-diffblue
Copy link
Contributor

hannes-steffenhagen-diffblue commented Jul 8, 2019

CBMC version: develop (acb3aba)
Operating system: Linux (Ubuntu 18.04)
Exact command line resulting in the issue: cbmc --trace test.c
What behaviour did you expect: It should show a counterexample with the field set to a non-0 value
What happened instead: The counterexample had its field set to 0

Here we have a test with a failing assertion:

//test.c
struct SomeStruct
{
  int x;
};

int main(void)
{
  struct SomeStruct x;
  assert(x.x == 0);
}

cbmc finds the problem (x.x can be non-zero) just fine, but in the produced trace we have

State 21 file test.c function main line 8 thread 0
----------------------------------------------------
  x={ .x=0 } ({ 00000000 00000000 00000000 00000000 })

Violated property:
  file test.c function main line 9 thread 0
  assertion x.x != 0
  x.x != 0

A git bisect revealed that this issue was introduced in 6e514de.

EDIT: issue had it wrong before, the problem appears with assert(x.x == 0), not !=

@smowton
Copy link
Contributor

smowton commented Jul 31, 2019

Fixed by #4964

@smowton smowton closed this as completed Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants