File tree Expand file tree Collapse file tree 5 files changed +91
-0
lines changed Expand file tree Collapse file tree 5 files changed +91
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+ #include <stdio.h>
3
+
4
+ int main (int argc , char * argv [])
5
+ {
6
+ dprintf (1 , "some string %s: %d\n" , argv [0 ], 42 );
7
+ dprintf (1 , "some other string\n" );
8
+ return 0 ;
9
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --pointer-check --bounds-check
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^VERIFICATION SUCCESSFUL$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ #include <stdarg.h>
2
+ #include <stdio.h>
3
+
4
+ int xdprintf (int fd , const char * format , ...)
5
+ {
6
+ va_list list ;
7
+ va_start (list , format );
8
+ int result = vdprintf (fd , format , list );
9
+ va_end (list );
10
+ return result ;
11
+ }
12
+
13
+ int main ()
14
+ {
15
+ xdprintf (1 , "%d\n" , 42 );
16
+ return 0 ;
17
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --pointer-check --bounds-check
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^VERIFICATION SUCCESSFUL$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -1540,6 +1540,55 @@ __CPROVER_HIDE:;
1540
1540
return result ;
1541
1541
}
1542
1542
1543
+ /* FUNCTION: dprintf */
1544
+
1545
+ #ifndef __CPROVER_STDIO_H_INCLUDED
1546
+ # include <stdio.h>
1547
+ # define __CPROVER_STDIO_H_INCLUDED
1548
+ #endif
1549
+
1550
+ #ifndef __CPROVER_STDARG_H_INCLUDED
1551
+ # include <stdarg.h>
1552
+ # define __CPROVER_STDARG_H_INCLUDED
1553
+ #endif
1554
+
1555
+ int dprintf (int fd , const char * restrict format , ...)
1556
+ {
1557
+ __CPROVER_HIDE :;
1558
+ va_list list ;
1559
+ va_start (list , format );
1560
+ int result = dprintf (fd , format , list );
1561
+ va_end (list );
1562
+ return result ;
1563
+ }
1564
+
1565
+ /* FUNCTION: vdprintf */
1566
+
1567
+ #ifndef __CPROVER_STDIO_H_INCLUDED
1568
+ # include <stdio.h>
1569
+ # define __CPROVER_STDIO_H_INCLUDED
1570
+ #endif
1571
+
1572
+ #ifndef __CPROVER_STDARG_H_INCLUDED
1573
+ # include <stdarg.h>
1574
+ # define __CPROVER_STDARG_H_INCLUDED
1575
+ #endif
1576
+
1577
+ int __VERIFIER_nondet_int (void );
1578
+
1579
+ int vdprintf (int fd , const char * restrict format , va_list arg )
1580
+ {
1581
+ __CPROVER_HIDE :;
1582
+
1583
+ int result = __VERIFIER_nondet_int ();
1584
+
1585
+ (void )fd ;
1586
+ (void )* format ;
1587
+ (void )arg ;
1588
+
1589
+ return result ;
1590
+ }
1591
+
1543
1592
/* FUNCTION: vasprintf */
1544
1593
1545
1594
#ifndef __CPROVER_STDIO_H_INCLUDED
You can’t perform that action at this time.
0 commit comments