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

Fixing staticcall abstraction, test case search, and commenting out bug with solidity #632

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

msooseth
Copy link
Collaborator

@msooseth msooseth commented Jan 15, 2025

Description

Turns out our staticcall abstraction messed up the stack. It actually left too many elements on the stack. This fixes that.

Also:

  • There is a known, fixed bug with Solidity and yul and json. I commented out the file that triggers it. Fixed in upcoming solidity.
  • The way we were excluding test cases was wrong(!). We used isSubsequenceOf instead of isInfixOf. Wow. Fixed.
  • Added some commented-out, but helpful debug code.

Checklist

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

@msooseth msooseth changed the title Ooops, staticcall was wrong. This fixes it. Fixing staticcall abstraction, test case search, and commenting out bug with solidity Jan 16, 2025
Also:
- Adding one more exception due to bug in solidity
- Updating changelog
@msooseth msooseth requested a review from arcz January 16, 2025 12:59
@msooseth msooseth marked this pull request as ready for review January 16, 2025 12:59
@msooseth msooseth requested a review from elopez January 20, 2025 11:59
test/test.hs Outdated Show resolved Hide resolved
test/test.hs Show resolved Hide resolved
@blishko
Copy link
Collaborator

blishko commented Jan 21, 2025

Turns out our staticcall abstraction messed up the stack. It actually left too many elements on the stack. This fixes that.

This is related to the recent changes you made? The abstraction of the static calls? Was that before or after the last release?

@msooseth
Copy link
Collaborator Author

It's related to staticcall abstraction. The stack was messed up, it didn't actually remove the elements from the stack that it was supposed to remove. I had to fix the test filtering too, because our test filtering was wrong, and it filtered out the test that actually catches this bug! :)

@blishko
Copy link
Collaborator

blishko commented Jan 21, 2025

I was asking mostly to know if the problem with staticcall abstraction has been there for a while or if it was something you introduced in the recent changes.
Because in the latter case I would say there should not be a new changelog entry about it, since it would not be something that is fixed compared to the last release.
Anyway, that's just nitpicking...

@msooseth
Copy link
Collaborator Author

I was asking mostly to know if the problem with staticcall abstraction has been there for a while or if it was something you introduced in the recent changes. Because in the latter case I would say there should not be a new changelog entry about it, since it would not be something that is fixed compared to the last release. Anyway, that's just nitpicking...

Fair :) I fixed the changelog now:

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53661689..7b5c734d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,12 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - More simplification rules for Props
 - Using the SMT solver to get a single concrete value for a symbolic expression
   and continue running, whenever possible
+- STATICCALL abstraction is now performed in case of symbolic arguments

 ## Fixed
 - We now try to simplify expressions fully before trying to cast them to a concrete value
   This should improve issues when "Unexpected Symbolic Arguments to Opcode" was
   unnecessarily output
-- STATICCALL abstraction left incorrect stack, fixed
 - Not all testcases ran due to incorrect filtering, fixed
 - Removed dead code related to IOAct in the now deprecated and removed debugger

Do you think we can merge this PR?

Copy link
Collaborator

@blishko blishko left a comment

Choose a reason for hiding this comment

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

LGTM!

@msooseth msooseth merged commit b576ca7 into main Jan 22, 2025
9 checks passed
@msooseth msooseth deleted the fixing-staticcall branch January 22, 2025 10:33
@msooseth
Copy link
Collaborator Author

Thanks so much!

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