-
Notifications
You must be signed in to change notification settings - Fork 5
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
Morty stack overflow #51
Comments
I have encountered stack overflows with morty before, but have not had the chance to concretely debug it or look for the root cause. I believe it is due to sv-parser, and it occurs for very long systemverilog statements. Modifying the code to split these statements works, but is a cumbersome workaround. Feel free to dig into the morty and sv-parser code and find the root cause, I'd be happy to review a corresponding pull request! |
Hi Michael, thank you for your quick response! Having no familiarity with the implementation of Morty and sv-parser, it's unlikely that I can find the root cause if you cannot yourself unfortunately. Thanks! |
I think the easiest way to find the culprit is to use morty's verbose mode to help figure out which file contains the issue. From my experience it is usually very long |
Thank you for your response! I made several experiments:
|
I don't know how much I can help here. I tested your repository and, after removing |
Hi again! |
Are you using the development version on the |
@huettern also had the same problem with some large auto-generated Xilinx files. My assumption would be that this is due to an exceeded parse depth. |
Thank you for your answers! Indeed with the collect_defines files it seems to work 🥳 ! However it's super slow, so not the best candidate for a master. How about a flag for parallelism? |
Great that it works. Indeed it is far slower, but depending on the desired feature set it is the way to go. I doubt there is much desire to spend time speeding up parsing significantly for morty, AFAIK pickling is an infrequent task that can tolerate some latency. I plan to add some flags for configuration to enable/disable define chaining, parallelism, etc. (one of the reasons the branch is not yet ready for merging), but haven't found the time. |
That would be great! Thanks! |
Nice, the -q flag seems to do the job! |
Glad to hear that. |
Hi there! Me again 😇
Morty stack overflows on some CPU code.
Output
How to reproduce
Tried on Ubuntu 22.04 with morty 0.8.0.
Thanks!
The text was updated successfully, but these errors were encountered: