File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
regression/cbmc-library/fileno-01 Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
int main ()
5
5
{
6
- fileno ();
7
- assert (0 );
6
+ assert (fileno (stdin ) == 0 );
7
+ assert (fileno (stdout ) == 1 );
8
+ assert (fileno (stderr ) == 2 );
9
+
10
+ FILE * some_file ;
11
+ assert (fileno (some_file ) >= -1 );
12
+
8
13
return 0 ;
9
14
}
Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
main.c
3
3
--pointer-check --bounds-check
4
4
^EXIT=0$
Original file line number Diff line number Diff line change @@ -391,7 +391,6 @@ int __VERIFIER_nondet_int();
391
391
392
392
inline int fileno (FILE * stream )
393
393
{
394
- // just return nondet
395
394
__CPROVER_HIDE :;
396
395
if (stream == stdin )
397
396
return 0 ;
@@ -401,6 +400,7 @@ __CPROVER_HIDE:;
401
400
return 2 ;
402
401
403
402
int return_value = __VERIFIER_nondet_int ();
403
+ __CPROVER_assume (return_value >= -1 );
404
404
405
405
#if !defined(__linux__ ) || defined(__GLIBC__ )
406
406
(void )* stream ;
You can’t perform that action at this time.
0 commit comments