-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Source mappings do not point to the correct location #5135
Comments
Are you talking about the |
So when compiling the given example, the complete source mapping is
. I am talking about the |
Ah right, that's a different helper routine, the "array resize routine". Since it can be used from multiple points, the closest source map that can be provided is the whole file. @yann300 can you give some insights into source map cleanup / filtering that is done in remix for the break points? |
So what is the difference between these two helper functions? Or in other words: Why is the first one deemed to be in an unknown file, while the second one references the whole file? |
The first one is built using yul, the other one uses the old style code generator. The difference is that yul actually is source code, while the second is just a sequence of opcodes. |
Description
The source mappings gained through
solc --combined-json srcmap-runtime
does not always give the correct translation from instruction offset to source code.Environment
Steps to Reproduce
Minimal example:
When checking to which source code offset the SSTORE instructions correspond to, the source mapping indicates the beginning of the contract. Expected would be
a.length = 1
.The text was updated successfully, but these errors were encountered: