Showing error 1449

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: list-properties/list_safe.cil.c
Line in file: 264
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

  1extern int __VERIFIER_nondet_int();
  2/* Generated by CIL v. 1.3.7 */
  3/* print_CIL_Input is true */
  4
  5#line 211 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h"
  6typedef unsigned long size_t;
  7#line 13 "list.c"
  8struct node {
  9   int h ;
 10   struct node *n ;
 11};
 12#line 13 "list.c"
 13typedef struct node *List;
 14#line 471 "/usr/include/stdlib.h"
 15extern  __attribute__((__nothrow__)) void *malloc(size_t __size )  __attribute__((__malloc__)) ;
 16#line 544
 17 __attribute__((__nothrow__, __noreturn__)) void exit(int s ) ;
 18#line 9 "list.c"
 19 __attribute__((__nothrow__, __noreturn__)) void exit(int s ) ;
 20#line 9 "list.c"
 21void exit(int s ) 
 22{ 
 23
 24  {
 25  _EXIT: 
 26  goto _EXIT;
 27}
 28}
 29#line 24
 30extern int ( /* missing proto */  __VERIFIER_nondet_int)() ;
 31#line 18 "list.c"
 32void main(void) 
 33{ List a ;
 34  void *tmp ;
 35  List t ;
 36  List p ;
 37  void *tmp___0 ;
 38  int tmp___1 ;
 39  void *tmp___2 ;
 40  int tmp___3 ;
 41  unsigned long __cil_tmp9 ;
 42  List __cil_tmp10 ;
 43  unsigned int __cil_tmp11 ;
 44  unsigned int __cil_tmp12 ;
 45  unsigned long __cil_tmp13 ;
 46  List __cil_tmp14 ;
 47  unsigned int __cil_tmp15 ;
 48  unsigned int __cil_tmp16 ;
 49  unsigned int __cil_tmp17 ;
 50  unsigned int __cil_tmp18 ;
 51  unsigned int __cil_tmp19 ;
 52  unsigned int __cil_tmp20 ;
 53  unsigned long __cil_tmp21 ;
 54  List __cil_tmp22 ;
 55  unsigned int __cil_tmp23 ;
 56  unsigned int __cil_tmp24 ;
 57  unsigned int __cil_tmp25 ;
 58  unsigned int __cil_tmp26 ;
 59  unsigned int __cil_tmp27 ;
 60  unsigned int __cil_tmp28 ;
 61  int __cil_tmp29 ;
 62  unsigned int __cil_tmp30 ;
 63  unsigned int __cil_tmp31 ;
 64  int __cil_tmp32 ;
 65  unsigned int __cil_tmp33 ;
 66  unsigned int __cil_tmp34 ;
 67  int __cil_tmp35 ;
 68
 69  {
 70  {
 71#line 20
 72  __cil_tmp9 = (unsigned long )8U;
 73#line 20
 74  tmp = malloc(__cil_tmp9);
 75#line 20
 76  a = (struct node *)tmp;
 77  }
 78  {
 79#line 21
 80  __cil_tmp10 = (List )0;
 81#line 21
 82  __cil_tmp11 = (unsigned int )__cil_tmp10;
 83#line 21
 84  __cil_tmp12 = (unsigned int )a;
 85#line 21
 86  if (__cil_tmp12 == __cil_tmp11) {
 87    {
 88#line 21
 89    exit(1);
 90    }
 91  } else {
 92
 93  }
 94  }
 95#line 23
 96  p = a;
 97  {
 98#line 24
 99  while (1) {
100    while_0_continue: /* CIL Label */ ;
101    {
102#line 24
103    tmp___1 = __VERIFIER_nondet_int();
104    }
105#line 24
106    if (tmp___1) {
107
108    } else {
109      goto while_0_break;
110    }
111    {
112#line 25
113    *((int *)p) = 1;
114#line 26
115    __cil_tmp13 = (unsigned long )8U;
116#line 26
117    tmp___0 = malloc(__cil_tmp13);
118#line 26
119    t = (struct node *)tmp___0;
120    }
121    {
122#line 27
123    __cil_tmp14 = (List )0;
124#line 27
125    __cil_tmp15 = (unsigned int )__cil_tmp14;
126#line 27
127    __cil_tmp16 = (unsigned int )t;
128#line 27
129    if (__cil_tmp16 == __cil_tmp15) {
130      {
131#line 27
132      exit(1);
133      }
134    } else {
135
136    }
137    }
138#line 28
139    __cil_tmp17 = (unsigned int )p;
140#line 28
141    __cil_tmp18 = __cil_tmp17 + 4;
142#line 28
143    *((struct node **)__cil_tmp18) = t;
144#line 29
145    __cil_tmp19 = (unsigned int )p;
146#line 29
147    __cil_tmp20 = __cil_tmp19 + 4;
148#line 29
149    p = *((struct node **)__cil_tmp20);
150  }
151  while_0_break: /* CIL Label */ ;
152  }
153  {
154#line 31
155  while (1) {
156    while_1_continue: /* CIL Label */ ;
157    {
158#line 31
159    tmp___3 = __VERIFIER_nondet_int();
160    }
161#line 31
162    if (tmp___3) {
163
164    } else {
165      goto while_1_break;
166    }
167    {
168#line 32
169    *((int *)p) = 2;
170#line 33
171    __cil_tmp21 = (unsigned long )8U;
172#line 33
173    tmp___2 = malloc(__cil_tmp21);
174#line 33
175    t = (struct node *)tmp___2;
176    }
177    {
178#line 34
179    __cil_tmp22 = (List )0;
180#line 34
181    __cil_tmp23 = (unsigned int )__cil_tmp22;
182#line 34
183    __cil_tmp24 = (unsigned int )t;
184#line 34
185    if (__cil_tmp24 == __cil_tmp23) {
186      {
187#line 34
188      exit(1);
189      }
190    } else {
191
192    }
193    }
194#line 35
195    __cil_tmp25 = (unsigned int )p;
196#line 35
197    __cil_tmp26 = __cil_tmp25 + 4;
198#line 35
199    *((struct node **)__cil_tmp26) = t;
200#line 36
201    __cil_tmp27 = (unsigned int )p;
202#line 36
203    __cil_tmp28 = __cil_tmp27 + 4;
204#line 36
205    p = *((struct node **)__cil_tmp28);
206  }
207  while_1_break: /* CIL Label */ ;
208  }
209#line 38
210  *((int *)p) = 3;
211#line 41
212  p = a;
213  {
214#line 42
215  while (1) {
216    while_2_continue: /* CIL Label */ ;
217    {
218#line 42
219    __cil_tmp29 = *((int *)p);
220#line 42
221    if (__cil_tmp29 == 1) {
222
223    } else {
224      goto while_2_break;
225    }
226    }
227#line 43
228    __cil_tmp30 = (unsigned int )p;
229#line 43
230    __cil_tmp31 = __cil_tmp30 + 4;
231#line 43
232    p = *((struct node **)__cil_tmp31);
233  }
234  while_2_break: /* CIL Label */ ;
235  }
236  {
237#line 44
238  while (1) {
239    while_3_continue: /* CIL Label */ ;
240    {
241#line 44
242    __cil_tmp32 = *((int *)p);
243#line 44
244    if (__cil_tmp32 == 2) {
245
246    } else {
247      goto while_3_break;
248    }
249    }
250#line 45
251    __cil_tmp33 = (unsigned int )p;
252#line 45
253    __cil_tmp34 = __cil_tmp33 + 4;
254#line 45
255    p = *((struct node **)__cil_tmp34);
256  }
257  while_3_break: /* CIL Label */ ;
258  }
259  {
260#line 46
261  __cil_tmp35 = *((int *)p);
262#line 46
263  if (__cil_tmp35 != 3) {
264    ERROR: 
265    goto ERROR;
266  } else {
267
268  }
269  }
270#line 49
271  return;
272}
273}