Skip to content

Commit 8edaf8e

Browse files
committed
C library: atexit
atexit introduces function calls that may affect the verification outcome.
1 parent dcdf046 commit 8edaf8e

File tree

21 files changed

+134
-35
lines changed

21 files changed

+134
-35
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <assert.h>
2+
#include <stdlib.h>
3+
4+
void cleanup()
5+
{
6+
assert(0);
7+
}
8+
9+
int main()
10+
{
11+
atexit(cleanup);
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--pointer-check --bounds-check
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
8+
^warning: ignoring
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <assert.h>
2+
#include <stdlib.h>
3+
4+
void cleanup()
5+
{
6+
assert(0);
7+
}
8+
9+
int main()
10+
{
11+
atexit(cleanup);
12+
exit(0);
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--pointer-check --bounds-check
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
8+
^warning: ignoring

regression/cbmc-library/posix_memalign-02/test.desc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ main.c
66
^VERIFICATION FAILED$
77
\[main.precondition_instance.1\] .* memcpy src/dst overlap: FAILURE
88
\[main.precondition_instance.3\] .* memcpy destination region writeable: FAILURE
9+
\*\* 2 of 24 failed
910
--
1011
^warning: ignoring

regression/cbmc-library/pthread_cond_wait-01/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ main.c
33
--bounds-check
44
^EXIT=10$
55
^SIGNAL=0$
6-
^\*\* 1 of 2 failed
6+
^\*\* 1 of 4 failed
77
^VERIFICATION FAILED$
88
--
99
^warning: ignoring

regression/cbmc/Pointer_byte_extract5/no-simplify.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ main.i
44
^EXIT=10$
55
^SIGNAL=0$
66
array\.List dynamic object upper bound in p->List\[2\]: FAILURE
7-
\*\* 1 of 11 failed
7+
\*\* 1 of 18 failed
88
--
99
^warning: ignoring
1010
--

regression/cbmc/array-cell-sensitivity2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ main::1::array!0@1#3 = with\(main::1::array!0@1#2, 1, main::argc!0@1#1\)
66
^EXIT=0$
77
^SIGNAL=0$
88
--
9-
\[\[[0-9]+\]\]
9+
array.*\[\[[0-9]+\]\]
1010
--
1111
This checks that arrays of uncertain size are always treated as aggregates and
1212
are not expanded into individual cell symbols (which use the [[index]] notation

regression/cbmc/array_constraints1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=10$
55
^SIGNAL=0$
66
^VERIFICATION FAILED$
7-
^\*\* 2 of 14
7+
^\*\* 2 of 24
88
--
99
^warning: ignoring

regression/cbmc/memory_allocation2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ main.c
55
^SIGNAL=0$
66
^\[main\.array_bounds\.[1-5]\] .*: SUCCESS$
77
^\[main\.array_bounds\.[67]\] line 38 array.buffer (dynamic object )?upper bound in buffers\[\(signed long (long )?int\)0\]->buffer\[\(signed long (long )?int\)100\]: FAILURE$
8-
^\*\* 1 of 6 failed
8+
^\*\* 2 of 9 failed
99
^VERIFICATION FAILED$
1010
--
1111
^warning: ignoring

0 commit comments

Comments
 (0)