-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
disasm: Return values #13
Comments
I'm assuming the On the upside, that should be sufficient to give us the return size, which is often a good proxy for guessing what the type is (e.g. 160 bits -> probably address). [Update: This is false] |
Using the dummy output value of |
If a function returns a size that is larger than Or maybe it's better to just use |
Started a WIP PR in #14, here are the vibes so far (from PR):
Also I thought it'd be easier to detect address type outputs because they're 20 bytes rather than the usual 32, but I forgot that things get padded so it still ends up being 32 bytes. I probably need to sleep on this in case there's other clever solutions but not looking great for single-pass static analysis right now. 😅 |
Updated the current state and challenges in the issue description, going to pass it around to some folks to see if anyone else has ideas. Feel free to re-share. :) |
I just merged a branch which does more advanced static analysis into master, haven't done a release yet. In some cases, it manages to successfully guess whether there are inputs or outputs (not super reliable, I'd say like... 60%?), but there have been major changes behind the scenes with how the static analysis works so we can do more advanced things moving forward. Also we now have Would appreciate some testing and feedback before I do a proper release. :) |
Next release issue is here: #18 |
Unfortunately selector hashes don't include the return value, so none of the 4byte databases include return types.
Questions:
What we have:
Updated challenges:
RETURN
from the end of each selector function's boundary.STOP
branch, which shouldn't be too hard to find in isolation (basicallyJUMPDEST STOP
, sometimes there are multiples, not sure why). Could we just use the absence of aSTOP
orJUMP
to aSTOP
offset as an indicator whether there is a return value of somekind?The text was updated successfully, but these errors were encountered: