joernio / joern

Open-source code analysis platform for C/C++/Java/Binary/Javascript/Python/Kotlin based on code property graphs. Discord https://discord.gg/vv4MH284Hc
https://joern.io/
Apache License 2.0
1.89k stars 258 forks source link

(C/C++) 'IDENTIFIER' node in ddg #1346

Open NemoTR opened 2 years ago

NemoTR commented 2 years ago

The C++ code is:

int f(int x, int *y)
{

    int a, b, c = 10;

    a = 10;
    b = a;
    a = g(c);

    return a;
}

The ddg is: 49XF(RSXKBB6X0~2~)PITH9

There is also an IDENTIFIER node in ddg and an edge from that node to return a node with label a. I found that if RETURN node returns only a variable, this situation will arise; In other cases, it won't.

Is it normal for an IDENTIFIER node to exist in ddg? I am looking forward to your answer, QAQ

max-leuthaeuser commented 2 years ago

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.