-
Notifications
You must be signed in to change notification settings - Fork 705
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
Question about the PC address reported by mythril #1766
Comments
Hi @ShangzhiXu are you checking runtime disassembly or creation disassembly? In this case, you'd have to check runtime disassembly. |
Thanks!I'll check it out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
So to sum up, I found that the
PC address
reported does not match the disassemble code generated by solc. I don't know if I made any mistake in usage or if I apprehend the meaning ofPC address
wrongly.Thanks for your help!!
Tests
Let's use the example in README:
There is an item in the report
PC address: 354
. I considered it as the offset of the opcode in bytecode. Like here, I think atPC address: 354
, the opcode should beCALL
, but when I try to check this out by reading the disassemble code generated bysolc
, I found they are different. The disassemble code looks like this at 354 (equal to 0x162)which is a pop.
Same thing happen when handling integer overflow, the
PC address
does not match the disassemble code generated bysolc
. For example, mythril reportsPC address : 100
, but the opcode in the disassemble code at offset 100 may not beMUL
,ADD
or other opcodes that might lead to overflow, instead, opcode at offset 100 might bePOP
CALL
or other things.Thanks for your help!!
The text was updated successfully, but these errors were encountered: