Skip to content

Commit a5b7d0d

Browse files
authored
Merge pull request #6763 from tautschnig/bugfixes/fs-havoc_object
Full slice: support havoc_object
2 parents a12526a + 2e15fb4 commit a5b7d0d

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--full-slice
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
^\*\* 6 of 8 failed.*$
8+
--

src/analyses/goto_rw.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,14 @@ static void goto_rw_other(
830830
rw_set.get_array_objects(
831831
function, target, rw_range_sett::get_modet::READ, code.op1());
832832
}
833+
else if(statement == ID_havoc_object)
834+
{
835+
PRECONDITION(code.operands().size() == 1);
836+
// re-use get_array_objects as this havoc_object affects whatever is the
837+
// object being the pointer that code.op0() is
838+
rw_set.get_array_objects(
839+
function, target, rw_range_sett::get_modet::LHS_W, code.op0());
840+
}
833841
}
834842

835843
static void goto_rw(

src/pointer-analysis/value_set.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,9 @@ void value_sett::apply_code_rec(
16761676
{
16771677
// Ignore by default; could prune the value set.
16781678
}
1679+
else if(statement == ID_havoc_object)
1680+
{
1681+
}
16791682
else
16801683
{
16811684
// std::cerr << code.pretty() << '\n';

src/pointer-analysis/value_set_fi.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,9 @@ void value_set_fit::apply_code(const codet &code, const namespacet &ns)
13991399
{
14001400
// doesn't do anything
14011401
}
1402+
else if(statement == ID_havoc_object)
1403+
{
1404+
}
14021405
else
14031406
throw
14041407
code.pretty()+"\n"+

0 commit comments

Comments
 (0)