Skip to content
New issue

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

Continue/break statements and strings problems in CFG generation #5

Open
diegocom opened this issue Jan 21, 2020 · 3 comments
Open

Comments

@diegocom
Copy link

I'm trying to generate the CFG of my solidity code.
Unfortunately there are some problems with Continue/Break statements inside while loop and with strings handling.

  1. Continue/Break statements point directly to next instruction and not to Start/End point of while.
  2. Strings generate syntax error in .dot rapresentation (the double quote is not escaped)

These are known problems?

@chao-peng
Copy link
Owner

Can you provide the code snippet for us to test through?

@diegocom
Copy link
Author

diegocom commented Jan 30, 2020

Snippet CFG:

contract test{ function testFunction() { uint flag = 1; while(flag != 0){ if(flag == 1){ break; } if(flag == 2){ continue; } } } }

cfg

Snippet string error:
contract test{ function testFunction() { uint a = 0; require(a > 0, "error a variable"); } }

@chao-peng
Copy link
Owner

Thank you very much for providing this useful bug report. I will work on these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants