Skip to content

Commit eadcdc6

Browse files
committed
avoid crashing on alias analysis failure on loops
1 parent a6b4072 commit eadcdc6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/goto-instrument/loop_utils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ void get_modifies_lhs(
5151
for(const auto &mod : local_may_alias.get(t, ptr.pointer))
5252
{
5353
const typecast_exprt typed_mod{mod, ptr.pointer.type()};
54+
if(mod.id() == ID_unknown)
55+
{
56+
throw analysis_exceptiont("Alias analysis returned UNKNOWN!");
57+
}
5458
if(ptr.offset.is_nil())
5559
modifies.insert(dereference_exprt{typed_mod});
5660
else

0 commit comments

Comments
 (0)