Skip to content

Commit 7c273cd

Browse files
Norbert Mantheynmanthey
authored andcommitted
objects read: also treat ADDRESS_OF as read
Previously, all objects that are passed via address are not considered as being read. This commit adds this case to the analysis.
1 parent dad59ca commit 7c273cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/goto-programs/goto_program.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@ void objects_read(
340340
else if(src.id()==ID_address_of)
341341
{
342342
// don't traverse!
343+
assert(src.operands().size() == 1);
344+
dest.push_back(src);
345+
objects_read(src.op0(), dest);
343346
}
344347
else if(src.id()==ID_dereference)
345348
{

0 commit comments

Comments
 (0)