-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Stack overflow when handling chained/nested else-if #75043
Comments
See also #72393. |
Wat. Why is the syntax formatter hitting the compiler binding code? |
Note, unless the core syntax rewriter is updated to handle this, we are unlikely to do anything about this on the ide side. Using those rewriters is a core part of formatting. |
Sorry for the confusion, they are not from the same error, I've updated the stack trace. Switching to Linux for a different default stack size seems to work in my case, hopefully it will be supported via |
Ah ok. That makes more sense :-) |
Closing as dupe |
Version Used:
Microsoft.CodeAnalysis.CSharp 4.10.0.0
Steps to Reproduce and result:
if
statement and 2000else if
attached to it. (I know this is bad...)dotnet format
same as VisualBasicOrganizeImportsService.OrganizeImportsAsync throws InsufficientExecutionStackException #44710
https://github.com/dotnet/sdk/blob/5171dbf074918745f77c1ecce3474977fa45381d/src/BuiltInTools/dotnet-format/Formatters/OrganizeImportsFormatter.cs#L53-L59
Linux survives under 1500 else-ifs, but eventually it will run out of stack space when nesting more of them
Sample: notsosmart.zip
The text was updated successfully, but these errors were encountered: