Skip to content

Commit 3a3a605

Browse files
author
Norbert Manthey
committed
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 69c13b1 commit 3a3a605

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/goto-programs/goto_program.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ void objects_read(
372372
else if(src.id()==ID_address_of)
373373
{
374374
// don't traverse!
375+
assert(src.operands().size()==1);
376+
dest.push_back(src);
377+
objects_read(src.op0(), dest);
375378
}
376379
else if(src.id()==ID_dereference)
377380
{

0 commit comments

Comments
 (0)