-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
solc: Stack overflow importing large AST from json file #13179
Comments
I believe this won't be too difficult to solve, so marking this as easy/good first issue, but in case I am wrong, feel free to comment/correct here |
I have tracked down the stack overflow to a |
So far here is the situation: IR is generated with comments next to instructions indicating the source location.
The comments may contain some "garbage" which come from debug info (as reported in issue #12168). The debug info comes from method dispenseLocationComment.
I guess that is another problem with too long sequences of chars. I will continue to investigate from this point now, until we can decided the best solution. |
This is actually the expected output without |
Yes, just checked it and with |
Probably related: #13496 |
Description
Importing an AST with
--import-ast
using a large JSON file results in a stack overflow and segmentation fault with certain output options.A quick run with memcheck shows that it stems from a regex match.
Environment
Steps to Reproduce
Create a large AST as JSON. Here is Uniswap V3 as an example (20.2 MB) from the external tests: uniswap_ast.zip
Try generating IR output - currently segfaults:
Try generating assembly from IR - currently segfaults:
Regular assembly with the
--asm
flag only works as expected for this file.The text was updated successfully, but these errors were encountered: