joern icon indicating copy to clipboard operation
joern copied to clipboard

(C/C++) Lost REACHING_DEF edge in statement 'a = a + 1' or 'a = a + i'

Open NemoTR opened this issue 2 years ago • 3 comments

Here is the test code:

int f()
{
    int a = 10;
    a = a + 1;
    for (int i = 1; i <= 10; i++)
        a = a + i;
    return a;
}

There should be a REACHING_DEF edge from a + 1 ('CALL' node) to a = a + 1 ('CALL' node) and a REACHING_DEF edge from a + i ('CALL' node) to a = a + i ('CALL' node) However, here is the ddg of f: image The above-mentioned REACHING_DEF edges are LOST! The a + 1 ('CALL' node) and a + i ('CALL' node) have no out edge at all!

NemoTR avatar May 06 '22 14: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

The major rewrite is merged. Please test again.

fabsx00 avatar May 27 '22 12:05 fabsx00

Tried on version 1.1.891, still not fixed. image

NemoTR avatar Jun 16 '22 02:06 NemoTR

@NemoTR can you test again?

itsacoderepo avatar Jan 18 '23 16:01 itsacoderepo

Closing because it seems outdated

itsacoderepo avatar Jun 18 '23 12:06 itsacoderepo