Skip to content

Commit

Permalink
see #431 -- example for bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldietsch committed Jul 2, 2019
1 parent b5fb152 commit d22fcab
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//#Safe
// This program clamps an integer and should not produce an overflow.
// Nevertheless, we receive a counterexample with
// -tc AutomizerC.xml
// -s settings/default/automizer/svcomp-Overflow-32bit-Automizer_Default.epf
// on 0.1.24-b5fb152
//
// We found a FailurePath:
// [L5] x >= 1000000 ? 1000000 : x + 1
// VAL [\old(x)=-2147483650, x=-2147483650]
// [L5] x + 1
// VAL [\old(x)=-2147483650, x=-2147483650]
//
// This is probably a bug in library mode where parameters of functions are not assumed to be in range although the option is set.
//

int foo();

int main() {
int x = foo();
return x >= 1000000 ? 1000000 : x + 1;
}

0 comments on commit d22fcab

Please sign in to comment.