SIF
SIF copied to clipboard
Continue/break statements and strings problems in CFG generation
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.
- Continue/Break statements point directly to next instruction and not to Start/End point of while.
- Strings generate syntax error in .dot rapresentation (the double quote is not escaped)
These are known problems?
Can you provide the code snippet for us to test through?
Snippet CFG:
contract test{ function testFunction() { uint flag = 1; while(flag != 0){ if(flag == 1){ break; } if(flag == 2){ continue; } } } }
Snippet string error:
contract test{ function testFunction() { uint a = 0; require(a > 0, "error a variable"); } }
Thank you very much for providing this useful bug report. I will work on these issues.