File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
regression/cbmc-incr-smt2/pointers Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <inttypes.h>
3+ #include <stdbool.h>
4+ #include <stddef.h>
5+
6+ int main ()
7+ {
8+ int notdet_int ;
9+ int * ptr ;
10+ bool notdet_bool ;
11+ if (notdet_bool )
12+ {
13+ ptr = & notdet_int ;
14+ assert (((uint64_t )ptr ) > 1 );
15+ }
16+ else
17+ {
18+ ptr = NULL ;
19+ }
20+ assert (((uint64_t )ptr ) != 0 );
21+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ null_pointer.c
3+ --trace
4+ Passing problem to incremental SMT2 solving
5+ line 14 assertion \(\(uint64_t\)ptr\) > 1: SUCCESS
6+ line 20 assertion \(\(uint64_t\)ptr\) != 0: FAILURE
7+ notdet_bool=FALSE \(0+\)
8+ ^EXIT=10$
9+ ^SIGNAL=0$
10+ --
11+ notdet_bool=TRUE
12+ --
13+ Tests for null related functionality.
14+ * Assignment of the value NULL to a pointer.
15+ * Comparison of NULL pointer value against 0.
16+ * Check that the address of a non-null pointer is not an offset into the NULL
17+ object.
You can’t perform that action at this time.
0 commit comments