We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Single variable special if-statements don't have the correct data dependency edges and location in the DDG.
I used the following code:
int main(int argc) { if (argc) { puts("hello world"); } return 0; }
Note the special syntax on if(argc), which is equal to if(argc!=0). In a normal DDG, the if argc line should be dependent on argc.
if(argc)
if(argc!=0)
if argc
argc
Instead, I get the following graph:
if (argc) is shown to have no predecessors aside from the start, which is not correct. If you change the above to be argc!=0, the DDG is correct.
if (argc)
argc!=0
I believe this bug is related to or is a regression of #2833.
To Reproduce Put the code above into a C file, then import it. Run the following line:
cpg.method("main").dotDdg.l
You should get the same dot graph shown above.
Expected behavior The correct graph looks like the following:
It shows that if(argc) depends on argc.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Single variable special if-statements don't have the correct data dependency edges and location in the DDG.
I used the following code:
Note the special syntax on
if(argc)
, which is equal toif(argc!=0)
. In a normal DDG, theif argc
line should be dependent onargc
.Instead, I get the following graph:
if (argc)
is shown to have no predecessors aside from the start, which is not correct. If you change the above to beargc!=0
, the DDG is correct.I believe this bug is related to or is a regression of #2833.
To Reproduce
Put the code above into a C file, then import it.
Run the following line:
You should get the same dot graph shown above.
Expected behavior
The correct graph looks like the following:
It shows that
if(argc)
depends onargc
.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: