Skip to content

Commit 49645bc

Browse files
committed
Add regression test for matching against pointer values in traces of new SMT backend.
1 parent 5cdccdd commit 49645bc

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
int main()
2+
{
3+
int *a;
4+
int *b = 0;
5+
int *c;
6+
__CPROVER_assume(c != 0);
7+
8+
__CPROVER_assert(
9+
a != b, "should fail because a can be any pointer val, including NULL");
10+
__CPROVER_assert(
11+
a != c, "should fail because a and c can point to same object");
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
pointer_values.c
3+
--trace
4+
\[main\.assertion\.1\] line \d+ should fail because a can be any pointer val, including NULL: FAILURE
5+
\[main\.assertion\.2\] line \d+ should fail because a and c can point to same object: FAILURE
6+
a=\(\(signed int \*\)NULL\)
7+
c=\(signed int \*\)1
8+
^EXIT=10$
9+
^SIGNAL=0$
10+
--
11+
--
12+
Test printing of NULL pointer values in trace.

0 commit comments

Comments
 (0)