-
Notifications
You must be signed in to change notification settings - Fork 979
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
Create return nodes for named implicit returns #1880
Conversation
Given a list of functions from one contract, finds tainted functions/variables in other contracts
due to get_dependencies missing dependencies
@0xalpharush @montyly what is the best way to go about updating all of the expected results for the CI tests that are affected by this change? |
The printers are failing because of an assertion failure:
I would check locally that the updates are correct, but you can run |
Since we decided on closing #1886 in favor of leaving the empty functions flagged as implemented and just adding an implicit Also, @montyly you mentioned: Do you have any thoughts on what the best way to capture this information? I imagine we wouldn't want to create a new |
@0xalpharush could you take a look at this test failure and let me know if you can tell why it's failing? I think practically all of the assertion failures in the 2 failing checks below are due to the new return nodes, and can be resolved by updating the expected CFGs. But I can't think of any reason why a reentrancy detector would have failed. |
It may have something to do with the fact that |
… dev-named-implicit-returns
It looks like each |
This comment was marked as resolved.
This comment was marked as resolved.
All checks are passing, including the |
replaced by #2326 |
Resolves issues #1450 and #1719, and includes the previously failing test from #1818, which now passes.
Creates an artificial return node iff a function has a named return variable declared in its signature. Finds all leaf nodes in the CFG which are not return nodes, and links them to the artificial return node. The return node is given an Identifier expression with a
referencedDeclaration
pointing to the variable declaration in the signature.Once this return node is in place and correctly linked, subsequent analyses resolve the data dependency issue for named variables without any further changes, i.e., to Slither's IR generation. The goal being to implement the simplest solution to that problem.
Depends on #1886