joern icon indicating copy to clipboard operation
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

Open NemoTR opened this issue 2 years ago • 1 comments

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: image

Hope you can think about adding the above-mentioned REACHING_DEF edge to make the ddg more exact.

NemoTR avatar May 04 '22 06:05 NemoTR

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.

max-leuthaeuser avatar May 06 '22 14:05 max-leuthaeuser