-
Notifications
You must be signed in to change notification settings - Fork 130
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
bug: cfg graph starts from offset 0x01 instead of 0x00 #499
Labels
T-bug
Type: bug
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component
Heimdall (Core)
Have you ensured that you are up to date?
What version of Heimdall are you on?
heimdall 0.8.4
Operating System
macOS (Apple Silicon)
Describe the bug
I'm generating the cfg of a very simple contract to try heimdall.
everything works fine but I don't understand why heimdall uses offset in the bytecode starting from 0x01 instead of 0x00.
This creates some confusion because, take the example I have in the image, the first block has a jumpi that should point to 0x20. But heimdall shows the jumpdest at offset 0x21 (because of the shifts of the offset). While at offset 0x20 heimdall shows a different opcode (JUMP in this example).
The contract:
I took the runtime bytecode through solc and gave it to heimdall cfg
The graph:

tg discussion here: https://t.me/heimdallsupport/388
The text was updated successfully, but these errors were encountered: