joern icon indicating copy to clipboard operation
joern copied to clipboard

(C/C++) Wrong REACHING_DEF edge and node of pointer

Open NemoTR opened this issue 2 years ago • 1 comments

The C++ code is:

int f(int x, int *y)
{
    *y = 10;

    y = &x;

    *y = 20;

    return x;
}

The ddg is: image

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.

NemoTR avatar May 03 '22 12: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