joern
joern copied to clipboard
(C/C++) REACHING_DEF edge goes wrong while using array indexing
Here is the test code:
int a[10], c = 2;
a[c] = 3;
a[c + 1] = 4;
c += 1;
return a[c];

There shoudln't be an edge from a[c] = 3 to return a[c] but should be one from a[c + 1] to return a[c].
Just using the literal code to identify a[c] is not always right due to the change of c.
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 hello,I am using the latest version of Joern, but the issue persists