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

New exploration stopping condition #1799

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

feliam
Copy link
Contributor

@feliam feliam commented Aug 27, 2020

Rather than stopping when the last tx has not uncovered any new code at any of the explored states.
Stop when each state in its own did not find any new code.

What?

Consider this example....

contract MotivatingExample {
    event Log(string);
    int  stateA = 0;
    int  stateB = 0;
    function f(int input) public {
    	stateA=input;
        }
    function g() public {
        stateB = stateA;
        }
    function h() payable public {
        if(stateB == 61){
          emit Log("Bug found");
         }
    }
}

You need a trace with f()-g()-h() to emit the bug log. though in the first explored tx manticore will fork and explore f(), and g(), and h() all in different states hitting most of the code. Then in the second TX no new coverage would be found and the third tx will never be tried. IFFyou used the global coverage stopping condition

This adds a way to stop only when no state made any progress in its own world. Clearly a longer process.

@ehennenfent ehennenfent added this to In progress in Manticore Sep 1, 2020
@ehennenfent ehennenfent moved this from In progress to To do in Manticore Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Manticore
  
To do
Development

Successfully merging this pull request may close these issues.

None yet

1 participant