User: | Jiri Slaby |
Error type: | Reachable Error Location |
Error type description: | A specified error location is reachable in some program path |
File location: | loops/nec20_unsafe.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} 7int b; 8_Bool __VERIFIER_nondet_bool(); 9int main(){ 10 _Bool k=__VERIFIER_nondet_bool(); 11 int i,n,j; 12 int a[1025]; 13 14 if (k){ 15 n=0; 16 } else { 17 n=1023; 18 } 19 20 i=0; 21 22 while ( i <= n){ 23 i++; 24 j= j +2; 25 } 26 27 a[i]=0; 28 a[j]=0; 29 __VERIFIER_assert(j<1025); 30 a[b]=0; 31 if (b >= 0 && b < 1023) 32 a[b]=1; 33 else 34 a[b%1023] =1; 35 36 return 1; 37 38}