Showing error 1455

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/splice_safe.cil.c
Line in file: 321
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 15 "splice.c"
  8struct node {
  9   int h ;
 10   struct node *n ;
 11};
 12#line 15 "splice.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 11 "splice.c"
 19 __attribute__((__nothrow__, __noreturn__)) void exit(int s ) ;
 20#line 11 "splice.c"
 21void exit(int s ) 
 22{ 
 23
 24  {
 25  _EXIT: 
 26  goto _EXIT;
 27}
 28}
 29#line 32
 30extern int ( /* missing proto */  __VERIFIER_nondet_int)() ;
 31#line 20 "splice.c"
 32int main(void) 
 33{ int flag ;
 34  List a ;
 35  void *tmp ;
 36  List t ;
 37  List l1 ;
 38  List l2 ;
 39  List p ;
 40  void *tmp___0 ;
 41  int tmp___1 ;
 42  unsigned long __cil_tmp12 ;
 43  List __cil_tmp13 ;
 44  unsigned int __cil_tmp14 ;
 45  unsigned int __cil_tmp15 ;
 46  unsigned long __cil_tmp16 ;
 47  List __cil_tmp17 ;
 48  unsigned int __cil_tmp18 ;
 49  unsigned int __cil_tmp19 ;
 50  unsigned int __cil_tmp20 ;
 51  unsigned int __cil_tmp21 ;
 52  unsigned int __cil_tmp22 ;
 53  unsigned int __cil_tmp23 ;
 54  int __cil_tmp24 ;
 55  int __cil_tmp25 ;
 56  unsigned int __cil_tmp26 ;
 57  unsigned int __cil_tmp27 ;
 58  unsigned int __cil_tmp28 ;
 59  unsigned int __cil_tmp29 ;
 60  unsigned int __cil_tmp30 ;
 61  unsigned int __cil_tmp31 ;
 62  List __cil_tmp32 ;
 63  unsigned int __cil_tmp33 ;
 64  unsigned int __cil_tmp34 ;
 65  int __cil_tmp35 ;
 66  unsigned int __cil_tmp36 ;
 67  unsigned int __cil_tmp37 ;
 68  List __cil_tmp38 ;
 69  unsigned int __cil_tmp39 ;
 70  unsigned int __cil_tmp40 ;
 71  int __cil_tmp41 ;
 72  unsigned int __cil_tmp42 ;
 73  unsigned int __cil_tmp43 ;
 74
 75  {
 76  {
 77#line 21
 78  flag = 1;
 79#line 24
 80  __cil_tmp12 = (unsigned long )8U;
 81#line 24
 82  tmp = malloc(__cil_tmp12);
 83#line 24
 84  a = (struct node *)tmp;
 85  }
 86  {
 87#line 25
 88  __cil_tmp13 = (List )0;
 89#line 25
 90  __cil_tmp14 = (unsigned int )__cil_tmp13;
 91#line 25
 92  __cil_tmp15 = (unsigned int )a;
 93#line 25
 94  if (__cil_tmp15 == __cil_tmp14) {
 95    {
 96#line 25
 97    exit(1);
 98    }
 99  } else {
100
101  }
102  }
103#line 31
104  p = a;
105  {
106#line 32
107  while (1) {
108    while_0_continue: /* CIL Label */ ;
109    {
110#line 32
111    tmp___1 = __VERIFIER_nondet_int();
112    }
113#line 32
114    if (tmp___1) {
115
116    } else {
117      goto while_0_break;
118    }
119#line 33
120    if (flag) {
121#line 34
122      *((int *)p) = 1;
123#line 35
124      flag = 0;
125    } else {
126#line 37
127      *((int *)p) = 2;
128#line 38
129      flag = 1;
130    }
131    {
132#line 40
133    __cil_tmp16 = (unsigned long )8U;
134#line 40
135    tmp___0 = malloc(__cil_tmp16);
136#line 40
137    t = (struct node *)tmp___0;
138    }
139    {
140#line 41
141    __cil_tmp17 = (List )0;
142#line 41
143    __cil_tmp18 = (unsigned int )__cil_tmp17;
144#line 41
145    __cil_tmp19 = (unsigned int )t;
146#line 41
147    if (__cil_tmp19 == __cil_tmp18) {
148      {
149#line 41
150      exit(1);
151      }
152    } else {
153
154    }
155    }
156#line 42
157    __cil_tmp20 = (unsigned int )p;
158#line 42
159    __cil_tmp21 = __cil_tmp20 + 4;
160#line 42
161    *((struct node **)__cil_tmp21) = t;
162#line 43
163    __cil_tmp22 = (unsigned int )p;
164#line 43
165    __cil_tmp23 = __cil_tmp22 + 4;
166#line 43
167    p = *((struct node **)__cil_tmp23);
168  }
169  while_0_break: /* CIL Label */ ;
170  }
171#line 45
172  *((int *)p) = 3;
173  {
174#line 47
175  __cil_tmp24 = *((int *)a);
176#line 47
177  if (__cil_tmp24 == 3) {
178#line 47
179    return (0);
180  } else {
181
182  }
183  }
184#line 49
185  flag = 1;
186#line 50
187  l1 = (struct node *)0;
188#line 51
189  l2 = (struct node *)0;
190#line 52
191  p = a;
192  {
193#line 53
194  while (1) {
195    while_1_continue: /* CIL Label */ ;
196    {
197#line 53
198    __cil_tmp25 = *((int *)p);
199#line 53
200    if (__cil_tmp25 != 3) {
201
202    } else {
203      goto while_1_break;
204    }
205    }
206#line 54
207    t = p;
208#line 55
209    __cil_tmp26 = (unsigned int )p;
210#line 55
211    __cil_tmp27 = __cil_tmp26 + 4;
212#line 55
213    p = *((struct node **)__cil_tmp27);
214#line 56
215    if (flag) {
216#line 57
217      __cil_tmp28 = (unsigned int )t;
218#line 57
219      __cil_tmp29 = __cil_tmp28 + 4;
220#line 57
221      *((struct node **)__cil_tmp29) = l1;
222#line 58
223      l1 = t;
224#line 59
225      flag = 0;
226    } else {
227#line 61
228      __cil_tmp30 = (unsigned int )t;
229#line 61
230      __cil_tmp31 = __cil_tmp30 + 4;
231#line 61
232      *((struct node **)__cil_tmp31) = l2;
233#line 62
234      l2 = t;
235#line 63
236      flag = 1;
237    }
238  }
239  while_1_break: /* CIL Label */ ;
240  }
241#line 68
242  p = l1;
243  {
244#line 69
245  while (1) {
246    while_2_continue: /* CIL Label */ ;
247    {
248#line 69
249    __cil_tmp32 = (List )0;
250#line 69
251    __cil_tmp33 = (unsigned int )__cil_tmp32;
252#line 69
253    __cil_tmp34 = (unsigned int )p;
254#line 69
255    if (__cil_tmp34 != __cil_tmp33) {
256
257    } else {
258      goto while_2_break;
259    }
260    }
261    {
262#line 70
263    __cil_tmp35 = *((int *)p);
264#line 70
265    if (__cil_tmp35 != 1) {
266      goto ERROR;
267    } else {
268
269    }
270    }
271#line 71
272    __cil_tmp36 = (unsigned int )p;
273#line 71
274    __cil_tmp37 = __cil_tmp36 + 4;
275#line 71
276    p = *((struct node **)__cil_tmp37);
277  }
278  while_2_break: /* CIL Label */ ;
279  }
280#line 73
281  p = l2;
282  {
283#line 74
284  while (1) {
285    while_3_continue: /* CIL Label */ ;
286    {
287#line 74
288    __cil_tmp38 = (List )0;
289#line 74
290    __cil_tmp39 = (unsigned int )__cil_tmp38;
291#line 74
292    __cil_tmp40 = (unsigned int )p;
293#line 74
294    if (__cil_tmp40 != __cil_tmp39) {
295
296    } else {
297      goto while_3_break;
298    }
299    }
300    {
301#line 75
302    __cil_tmp41 = *((int *)p);
303#line 75
304    if (__cil_tmp41 != 2) {
305      goto ERROR;
306    } else {
307
308    }
309    }
310#line 76
311    __cil_tmp42 = (unsigned int )p;
312#line 76
313    __cil_tmp43 = __cil_tmp42 + 4;
314#line 76
315    p = *((struct node **)__cil_tmp43);
316  }
317  while_3_break: /* CIL Label */ ;
318  }
319#line 79
320  return (0);
321  ERROR: 
322#line 81
323  return (1);
324}
325}