Skip to content

Commit 72694d1

Browse files
committed
Added usage of dynamic-objects with recency
Replaced the creation of plain dynamic-objects with dynamic-objects flagged with recency at the malloc allocation site.
1 parent 28dc578 commit 72694d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pointer-analysis/value_set.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -808,11 +808,12 @@ void value_sett::get_value_set_rec(
808808
const typet &dynamic_type=
809809
static_cast<const typet &>(expr.find("#type"));
810810

811-
dynamic_object_exprt dynamic_object(dynamic_type);
812-
dynamic_object.set_instance(location_number);
813-
dynamic_object.valid()=true_exprt();
811+
// Create the most-recent-allocation dynamic-object
812+
dynamic_object_exprt dynamic_object_recent(dynamic_type, true);
813+
dynamic_object_recent.set_instance(location_number);
814+
dynamic_object_recent.valid()=true_exprt();
814815

815-
insert(dest, dynamic_object, 0);
816+
insert(dest, dynamic_object_recent, 0);
816817
}
817818
else if(statement==ID_cpp_new ||
818819
statement==ID_cpp_new_array)

0 commit comments

Comments
 (0)