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

SymExec: default symbolic values when displaying calldata #336

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

d-xo
Copy link
Collaborator

@d-xo d-xo commented Jul 28, 2023

Description

Sometimes we get back a model that does not mention all variables that are present in the input calldata buffer. This can happen if those variables are not relevant to the branch that we are producing a model for.

In this case we can simply set the values that remain symbolic afters subsituting in our cex to some default value. We will still have issues here if we have lost some constraints over those variables during simplification, but it's better than what we're doing now (i.e. just printing "Any" if we can't get a fully concrete model for calldata out).

A fully general (and hopefully correct) approach could look like: #334

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@d-xo d-xo requested review from zoep and msooseth July 28, 2023 12:54
Sometimes we get back a model that does not mention all variables that
are present in the input calldata buffer. This can happen if those
variables are not relevant to the branch that we are producing a model
for.

In this case we can simply set the values that remain symbolic afters
subsituting in our cex to some default value. We will still have issues
here if we have lost some constraints over those variables during
simplification, but it's better than what we're doing now (i.e. just
printing "Any" if we can't get a fully concrete model for calldata out).

A fully general (and hopefully correct) approach could look like:
#334
@d-xo d-xo force-pushed the default-symvars-in-cexs branch from f279141 to 69075cb Compare July 28, 2023 13:13
Copy link
Collaborator

@zoep zoep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@d-xo d-xo merged commit b234df0 into main Jul 28, 2023
@d-xo d-xo deleted the default-symvars-in-cexs branch July 28, 2023 14:01
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.

2 participants