This repository has been archived by the owner on Oct 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
/
s3_clnt_1_false-unreach-call_true-no-overflow.BV.c.cil.c
636 lines (580 loc) · 36.6 KB
/
s3_clnt_1_false-unreach-call_true-no-overflow.BV.c.cil.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
extern int __VERIFIER_nondet_int(void);
/* Generated by CIL v. 1.3.7 */
/* print_CIL_Input is true */
int ssl3_connect(void)
{ int s__info_callback = __VERIFIER_nondet_int();
int s__in_handshake = __VERIFIER_nondet_int();
int s__state ;
int s__new_session ;
int s__server ;
int s__version = __VERIFIER_nondet_int();
int s__type ;
int s__init_num ;
int s__bbio = __VERIFIER_nondet_int();
int s__wbio = __VERIFIER_nondet_int();
int s__hit = __VERIFIER_nondet_int();
int s__rwstate ;
int s__init_buf___0 ;
int s__debug = __VERIFIER_nondet_int();
int s__shutdown ;
int s__ctx__info_callback = __VERIFIER_nondet_int();
int s__ctx__stats__sess_connect_renegotiate ;
int s__ctx__stats__sess_connect ;
int s__ctx__stats__sess_hit = __VERIFIER_nondet_int();
int s__ctx__stats__sess_connect_good = __VERIFIER_nondet_int();
int s__s3__change_cipher_spec ;
int s__s3__flags ;
int s__s3__delay_buf_pop_ret ;
int s__s3__tmp__cert_req = __VERIFIER_nondet_int();
int s__s3__tmp__new_compression = __VERIFIER_nondet_int();
int s__s3__tmp__reuse_message = __VERIFIER_nondet_int();
int s__s3__tmp__new_cipher = __VERIFIER_nondet_int();
int s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int();
int s__s3__tmp__next_state___0 ;
int s__s3__tmp__new_compression__id = __VERIFIER_nondet_int();
int s__session__cipher ;
int s__session__compress_meth ;
int buf ;
unsigned long tmp ;
unsigned long l ;
int num1 ;
int cb ;
int ret ;
int new_state ;
int state ;
int skip ;
int tmp___0 ;
int tmp___1 ;
int tmp___2 ;
int tmp___3 ;
int tmp___4 ;
int tmp___5 ;
int tmp___6 = __VERIFIER_nondet_int();
int tmp___7 = __VERIFIER_nondet_int();
int tmp___8 = __VERIFIER_nondet_int();
int tmp___9 = __VERIFIER_nondet_int();
int blastFlag ;
int ag_X ;
int ag_Y ;
int ag_Z = __VERIFIER_nondet_int();
unsigned int ag_V ;
unsigned int ag_W ;
int __retres62 ;
{
ag_V = 2U;
ag_W = 5U;
s__state = 12292;
blastFlag = 0;
tmp = __VERIFIER_nondet_int();
cb = 0;
ret = -1;
skip = 0;
tmp___0 = 0;
if (s__info_callback != 0) {
cb = s__info_callback;
} else {
if (s__ctx__info_callback != 0) {
cb = s__ctx__info_callback;
} else {
}
}
s__in_handshake = s__in_handshake + 1;
tmp___1 = __VERIFIER_nondet_int();
if (tmp___1 & 12288) {
tmp___2 = __VERIFIER_nondet_int();
if (tmp___2 & 16384) {
} else {
}
} else {
}
{
while (1) {
while_0_continue: /* CIL Label */ ;
state = s__state;
if (s__state == 12292) {
goto switch_1_12292;
} else {
if (s__state == 16384) {
goto switch_1_16384;
} else {
if (s__state == 4096) {
goto switch_1_4096;
} else {
if (s__state == 20480) {
goto switch_1_20480;
} else {
if (s__state == 4099) {
goto switch_1_4099;
} else {
if (s__state == 4368) {
goto switch_1_4368;
} else {
if (s__state == 4369) {
goto switch_1_4369;
} else {
if (s__state == 4384) {
goto switch_1_4384;
} else {
if (s__state == 4385) {
goto switch_1_4385;
} else {
if (s__state == 4400) {
goto switch_1_4400;
} else {
if (s__state == 4401) {
goto switch_1_4401;
} else {
if (s__state == 4416) {
goto switch_1_4416;
} else {
if (s__state == 4417) {
goto switch_1_4417;
} else {
if (s__state == 4432) {
goto switch_1_4432;
} else {
if (s__state == 4433) {
goto switch_1_4433;
} else {
if (s__state == 4448) {
goto switch_1_4448;
} else {
if (s__state == 4449) {
goto switch_1_4449;
} else {
if (s__state == 4464) {
goto switch_1_4464;
} else {
if (s__state == 4465) {
goto switch_1_4465;
} else {
if (s__state == 4466) {
goto switch_1_4466;
} else {
if (s__state == 4467) {
goto switch_1_4467;
} else {
if (s__state == 4480) {
goto switch_1_4480;
} else {
if (s__state == 4481) {
goto switch_1_4481;
} else {
if (s__state == 4496) {
goto switch_1_4496;
} else {
if (s__state == 4497) {
goto switch_1_4497;
} else {
if (s__state == 4512) {
goto switch_1_4512;
} else {
if (s__state == 4513) {
goto switch_1_4513;
} else {
if (s__state == 4528) {
goto switch_1_4528;
} else {
if (s__state == 4529) {
goto switch_1_4529;
} else {
if (s__state == 4560) {
goto switch_1_4560;
} else {
if (s__state == 4561) {
goto switch_1_4561;
} else {
if (s__state == 4352) {
goto switch_1_4352;
} else {
if (s__state == 3) {
goto switch_1_3;
} else {
{
goto switch_1_default;
if (0) {
switch_1_12292: /* CIL Label */
s__new_session = 1;
s__state = 4096;
s__ctx__stats__sess_connect_renegotiate = s__ctx__stats__sess_connect_renegotiate + 1;
switch_1_16384: /* CIL Label */ ;
switch_1_4096: /* CIL Label */ ;
switch_1_20480: /* CIL Label */ ;
switch_1_4099: /* CIL Label */
s__server = 0;
if (cb != 0) {
} else {
}
if ((s__version & 65280) != 768) {
ret = -1;
goto end;
} else {
}
s__type = 4096;
if (s__init_buf___0 == 0) {
buf = __VERIFIER_nondet_int();
if (buf == 0) {
ret = -1;
goto end;
} else {
}
tmp___3 = __VERIFIER_nondet_int();
if (! tmp___3) {
ret = -1;
goto end;
} else {
}
s__init_buf___0 = buf;
} else {
}
tmp___4 = __VERIFIER_nondet_int();
if (! tmp___4) {
ret = -1;
goto end;
} else {
}
tmp___5 = __VERIFIER_nondet_int();
if (! tmp___5) {
ret = -1;
goto end;
} else {
}
s__state = 4368;
s__ctx__stats__sess_connect = s__ctx__stats__sess_connect + 1;
s__init_num = 0;
goto switch_1_break;
switch_1_4368: /* CIL Label */ ;
switch_1_4369: /* CIL Label */
s__shutdown = 0;
ret = __VERIFIER_nondet_int();
if (blastFlag == 0) {
blastFlag = 1;
} else {
}
if (ret <= 0) {
goto end;
} else {
}
s__state = 4384;
s__init_num = 0;
if (s__bbio != s__wbio) {
} else {
}
goto switch_1_break;
switch_1_4384: /* CIL Label */ ;
switch_1_4385: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (blastFlag == 1) {
blastFlag = 2;
} else {
}
if (ret <= 0) {
goto end;
} else {
}
if (s__hit) {
s__state = 4560;
} else {
s__state = 4400;
}
s__init_num = 0;
goto switch_1_break;
switch_1_4400: /* CIL Label */ ;
switch_1_4401: /* CIL Label */ ;
if (s__s3__tmp__new_cipher__algorithms - 256) {
skip = 1;
} else {
ret = __VERIFIER_nondet_int();
if (blastFlag == 2) {
blastFlag = 3;
} else {
}
if (ret <= 0) {
goto end;
} else {
}
}
s__state = 4416;
s__init_num = 0;
goto switch_1_break;
switch_1_4416: /* CIL Label */ ;
switch_1_4417: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (blastFlag == 3) {
blastFlag = 4;
} else {
}
if (ret <= 0) {
goto end;
} else {
}
s__state = 4432;
s__init_num = 0;
if (! tmp___6) {
ret = -1;
goto end;
} else {
}
goto switch_1_break;
switch_1_4432: /* CIL Label */ ;
switch_1_4433: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (blastFlag == 5) {
goto ERROR;
} else {
}
if (ret <= 0) {
goto end;
} else {
}
s__state = 4448;
ag_X = 44;
ag_Y = 100;
s__init_num = 0;
goto switch_1_break;
switch_1_4448: /* CIL Label */ ;
switch_1_4449: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (blastFlag == 4) {
blastFlag = 5;
} else {
}
if (ret <= 0) {
goto end;
} else {
}
if (s__s3__tmp__cert_req) {
s__state = ag_X * ag_Y + ag_Z;
} else {
s__state = 4480;
}
s__init_num = 0;
goto switch_1_break;
switch_1_4464: /* CIL Label */ ;
switch_1_4465: /* CIL Label */ ;
switch_1_4466: /* CIL Label */ ;
switch_1_4467: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (ret <= 0) {
goto end;
} else {
}
s__state = 4480;
s__init_num = 0;
goto switch_1_break;
switch_1_4480: /* CIL Label */ ;
switch_1_4481: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (ret <= 0) {
goto end;
} else {
}
l = s__s3__tmp__new_cipher__algorithms;
if (s__s3__tmp__cert_req == 1) {
s__state = 4496;
} else {
s__state = 4512;
s__s3__change_cipher_spec = 0;
}
s__init_num = 0;
goto switch_1_break;
switch_1_4496: /* CIL Label */ ;
switch_1_4497: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (ret <= 0) {
goto end;
} else {
}
s__state = 4512;
s__init_num = 0;
s__s3__change_cipher_spec = 0;
goto switch_1_break;
switch_1_4512: /* CIL Label */ ;
switch_1_4513: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (ret <= 0) {
goto end;
} else {
}
s__state = 4528;
s__init_num = 0;
s__session__cipher = s__s3__tmp__new_cipher;
if (s__s3__tmp__new_compression == 0) {
s__session__compress_meth = 0;
} else {
s__session__compress_meth = s__s3__tmp__new_compression__id;
}
if (! tmp___7) {
ret = -1;
goto end;
} else {
}
if (! tmp___8) {
ret = -1;
goto end;
} else {
}
goto switch_1_break;
switch_1_4528: /* CIL Label */ ;
switch_1_4529: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (ret <= 0) {
goto end;
} else {
}
s__state = 4352;
s__s3__flags = (long )s__s3__flags - -5L;
if (s__hit) {
s__s3__tmp__next_state___0 = 3;
if ((long )s__s3__flags - 2L) {
s__state = 3;
s__s3__flags = (long )s__s3__flags + 4L;
s__s3__delay_buf_pop_ret = 0;
} else {
}
} else {
s__s3__tmp__next_state___0 = 4560;
}
s__init_num = 0;
goto switch_1_break;
switch_1_4560: /* CIL Label */ ;
switch_1_4561: /* CIL Label */
ret = __VERIFIER_nondet_int();
if (ret <= 0) {
goto end;
} else {
}
if (s__hit) {
s__state = 4512;
} else {
s__state = 3;
}
s__init_num = 0;
goto switch_1_break;
switch_1_4352: /* CIL Label */
if ((long )num1 > 0L) {
s__rwstate = 2;
num1 = tmp___9;
if ((long )num1 <= 0L) {
ret = -1;
goto end;
} else {
}
s__rwstate = 1;
} else {
}
s__state = s__s3__tmp__next_state___0;
goto switch_1_break;
switch_1_3: /* CIL Label */
if (s__init_buf___0 != 0) {
s__init_buf___0 = 0;
} else {
}
if (! ((long )s__s3__flags - 4L)) {
} else {
}
s__init_num = 0;
s__new_session = 0;
if (s__hit) {
s__ctx__stats__sess_hit = s__ctx__stats__sess_hit + 1;
} else {
}
ret = 1;
s__ctx__stats__sess_connect_good = s__ctx__stats__sess_connect_good + 1;
if (cb != 0) {
} else {
}
goto end;
switch_1_default: /* CIL Label */
ret = -1;
goto end;
} else {
switch_1_break: /* CIL Label */ ;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (! s__s3__tmp__reuse_message) {
if (! skip) {
if (s__debug) {
ret = __VERIFIER_nondet_int();
if (ret <= 0) {
goto end;
} else {
}
} else {
}
if (cb != 0) {
if (s__state != state) {
new_state = s__state;
s__state = state;
s__state = new_state;
} else {
}
} else {
}
} else {
}
} else {
}
skip = 0;
}
while_0_break: /* CIL Label */ ;
}
end:
s__in_handshake = s__in_handshake - 1;
if (cb != 0) {
} else {
}
__retres62 = ret;
goto return_label;
ERROR: __VERIFIER_error();
{
}
__retres62 = -1;
return_label: /* CIL Label */
return (__retres62);
}
}
int main(void)
{ int __retres1 ;
{
{
ssl3_connect();
}
__retres1 = 0;
return (__retres1);
}
}