User: | Jiri Slaby |
Error type: | Reachable Error Location |
Error type description: | A specified error location is reachable in some program path |
File location: | loops/linear_sea.ch_safe.i |
Line in file: | 3 |
Project: | SV-COMP 2013 |
Project version: | 2.6.28 |
Tools: |
Manual Work
|
Entered: | 2013-01-17 16:57:54 UTC |
1void __VERIFIER_assert(int cond) { 2 if (!(cond)) { 3 ERROR: goto ERROR; 4 } 5 return; 6} 7unsigned int __VERIFIER_nondet_uint(); 8unsigned int SIZE; 9int linear_search(int *a, int n, int q) { 10 unsigned int j=0; 11 while (j<n && a[j]!=q) { 12 j++; 13 } 14 if (j<SIZE) return 1; 15 else return 0; 16} 17int main() { 18 SIZE=(__VERIFIER_nondet_uint()/8)+1; 19 int a[SIZE]; 20 a[SIZE/2]=3; 21 __VERIFIER_assert(linear_search(a,SIZE,3)); 22}