joern
joern copied to clipboard
(C/C++) Wrong REACHING_DEF edge and node of pointer
The C++ code is:
int f(int x, int *y)
{
*y = 10;
y = &x;
*y = 20;
return x;
}
The ddg is:
There is a IDENTIFIER node in ddg and an edge from that node to return x
node with label x
.
This does not make sense.
And, there should be a REACHING_DEF edge from *y = 20
to return x
, but there isn't.
There is currently a major dataflow engine rewrite in the works that most likely will change a lot here. We will keep you posted on that. Hence, this issue here is on hold.