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

If num_find is zero attempt to explore all possible states #4016

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nmeum
Copy link
Contributor

@nmeum nmeum commented Jul 6, 2023

I wanted to explore all possible paths (i.e. run explore() until the active stash is empty). The only(?) way to do that right now seems to be to set num_find in the explore() invocation to a very high number, for example:

simgr.explore(num_find=999999999, find=…)

However, this does seem a bit hacky. Therefore, I propose adding a special value for num_find which causes all paths to be explored. This is implemented in this PR via num_find=0.

@ltfish
Copy link
Member

ltfish commented Jul 6, 2023

Have you ever tried passing in num_find=None, or just not passing num_find at all?

@ltfish
Copy link
Member

ltfish commented Jul 6, 2023

Uh I think this is a leftover problem from the Python 2 to 3 conversion...

The actual check should probably be return self.num_find is None and not simgr.stashes["active"] or len(simgr.stashes[self.find_stash]) >= self.num_find.

@nmeum
Copy link
Contributor Author

nmeum commented Jul 7, 2023

Not passing num_find does not work as it defaults to 1. Using None does not work because—as you pointed out—there is no explicit handling for num_find is None. However, I can updated my PR to instead explore all paths if num_find is None instead of 0.

@ltfish
Copy link
Member

ltfish commented Jul 12, 2023

@rhelmot As the magician designing amazing interfaces, what do you think?

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

Successfully merging this pull request may close these issues.

None yet

3 participants