Skip to content

Commit 000a56e

Browse files
author
Owen Jones
committed
Fix use of old flag name
External_value_set_exprt used to have a "modified" flag, but it was renamed to "initializer" (and its sense was inverted). This use of it was missed because it accessed the underlying irep directly rather than using a method of external_value_set_exprt itself. After some discussion, we think that this flag is probably ignored when this object is passed back to LVSA anyway, so the only purpose of removing it is so that two EVSs which only differ by this flag are considered the same. This PR changes it so that instead of both being set as "not modified" they are both set as "non_initializers", i.e. as "modified". I chose this because if there ever is a difference in the way that LVSA treats them the "initializer" EVS would return fewer values and so might be unsound.
1 parent 1e18b03 commit 000a56e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/taint-analysis/taint_summary.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ static exprt transform_external_objects(const exprt& e)
127127
evs_copy.extend_access_path(new_entry, external_value_set_typet::PER_FIELD);
128128
evs_copy.label()=constant_exprt("external_objects",string_typet());
129129
evs_copy.type()=e.type();
130-
evs_copy.remove("modified");
131-
return evs_copy;
130+
return evs_copy.as_non_initializer();
132131
}
133132
else if(e.id()==ID_external_value_set)
134133
{
@@ -139,8 +138,7 @@ static exprt transform_external_objects(const exprt& e)
139138
evs_copy.extend_access_path(new_entry, external_value_set_typet::PER_FIELD);
140139
evs_copy.label()=constant_exprt("external_objects",string_typet());
141140
evs_copy.type()=e.type();
142-
evs_copy.remove("modified");
143-
return evs_copy;
141+
return evs_copy.as_non_initializer();
144142
}
145143
else
146144
return e;

0 commit comments

Comments
 (0)