We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4bd3c2f + c6f1ed5 commit 813a0adCopy full SHA for 813a0ad
regression/cbmc-library/time-01/main.c
@@ -3,7 +3,11 @@
3
4
int main()
5
{
6
- time();
7
- assert(0);
+ time_t t1 = time(0);
+
8
+ time_t t;
9
+ time_t t2 = time(&t);
10
+ assert(t2 == t);
11
12
return 0;
13
}
regression/cbmc-library/time-01/test.desc
@@ -1,4 +1,4 @@
1
-KNOWNBUG
+CORE
2
main.c
--pointer-check --bounds-check
^EXIT=0$
src/ansi-c/library/time.c
@@ -12,7 +12,8 @@ time_t __VERIFIER_nondet_time_t();
time_t time(time_t *tloc)
14
time_t res=__VERIFIER_nondet_time_t();
15
- if(!tloc) *tloc=res;
+ if(tloc)
16
+ *tloc = res;
17
return res;
18
19
0 commit comments