Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CORE
double_deref_with_pointer_arithmetic.c
--show-vcc
^\{-[0-9]+\} derefd_pointer::derefd_pointer!0#1 = symex_dynamic::dynamic_object1#3\[cast\(mod #source_location=""\(main::argc!0@1#1, 2\), signedbv\[64\]\)\]
^\{1\} \(derefd_pointer::derefd_pointer!0#1 = address_of\(symex_dynamic::dynamic_object[23]\) \? main::argc!0@1#1 = 2 : main::argc!0@1#1 = 1\)
^\{1\} \(derefd_pointer::derefd_pointer!0#1 = address_of\(symex_dynamic::dynamic_object[23]\) \? main::argc!0@1#1 = 2 : \(derefd_pointer::derefd_pointer!0#1 = address_of\(symex_dynamic::dynamic_object[23]\) \? main::argc!0@1#1 = 1 : symex::invalid_object!0#0 = main::argc!0@1#1\)\)
^EXIT=0$
^SIGNAL=0$
--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
CORE
double_deref_with_pointer_arithmetic_single_alias.c
--show-vcc
\{1\} main::argc!0@1#1 = 1
\{1\} \(derefd_pointer::derefd_pointer!0#1 = address_of\(symex_dynamic::dynamic_object2\) \? main::argc!0@1#1 = 1 : symex::invalid_object!0#0 = main::argc!0@1#1\)
^EXIT=0$
^SIGNAL=0$
--
derefd_pointer::derefd_pointer
--
See README for details about these tests
10 changes: 10 additions & 0 deletions regression/cbmc/null5/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
int *nondet_ptr();

int main()
{
int *ptr;
ptr = nondet_ptr();
if(ptr == 0)
return;
__CPROVER_assert(ptr != 0, "pointer cannot be null");
}
11 changes: 11 additions & 0 deletions regression/cbmc/null5/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CORE
main.c

^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
^warning: ignoring
--
Pull request #4444 introduced optimisations during symbolic execution that
caused this test to spuriously fail (as the branch `ptr == 0` was removed).
5 changes: 2 additions & 3 deletions src/pointer-analysis/value_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,9 +976,8 @@ void value_sett::get_value_set_rec(
}
else
{
#if 0
std::cout << "WARNING: not doing " << expr.id() << '\n';
#endif
// for example: expr.id() == ID_nondet_symbol
insert(dest, exprt(ID_unknown, original_type));
}

#ifdef DEBUG
Expand Down