Skip to content
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

Deep recursion causes stack overflows. #2

Closed
belav opened this issue Feb 21, 2021 · 2 comments
Closed

Deep recursion causes stack overflows. #2

belav opened this issue Feb 21, 2021 · 2 comments
Labels
type:bug Something isn't working

Comments

@belav
Copy link
Owner

belav commented Feb 21, 2021

This shows up when formatting https://github.com/dotnet/runtime
That repository has specific files that appear to be designed to fail on deep recursion.
For now there is an ugly hack in place to prevent getting too deep in the recursive print functions.
https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Syntax/CSharpSyntaxWalker.cs has a potentially better way to guard against that.
Avoiding recursion would require a major rewrite, but may be more efficient.
This could provide some ideas for how to avoid recursion.
http://metacoding.azurewebsites.net/2016/08/16/how-to-avoid-recursion/

@belav
Copy link
Owner Author

belav commented May 24, 2022

At this point this isn't going to happen

@belav belav closed this as completed May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant