joern icon indicating copy to clipboard operation
joern copied to clipboard

(C/C++) REACHING_DEF edge goes wrong while using array indexing

Open NemoTR opened this issue 2 years ago • 1 comments

Here is the test code:

    int a[10], c = 2;
    a[c] = 3;
    a[c + 1] = 4;
    c += 1;
    return a[c];

image

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.

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

@max-leuthaeuser hello,I am using the latest version of Joern, but the issue persists

YoungBrady avatar Dec 31 '22 07:12 YoungBrady