joern
joern copied to clipboard
(C/C++) Lost REACHING_DEF edge between 'CALL' node of assignment to global variable and 'CALL' node to function using the global variable
This is the code.
int a;
int g()
{
return a;
}
int f()
{
a = 10;
return g();
}
In this code, a is a global variable.
In function g, return a uses a.
In function f, a = 10 defines the value of a.
So I think there should be an REACHING_DEF edge from a = 10 to g() in return g(), is this right?
The current ddg is:

Hope you can think about adding the above-mentioned REACHING_DEF edge to make the ddg more exact.
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.