-
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
Do not use SyntaxWalker to visit an arbitrary syntax tree in order to avoid a stack overflow. #59203
Conversation
… avoid a stack overflow. Fixes 59190.
public static readonly string F = ""a"" | ||
"; | ||
|
||
for (int i = 0; i < 3500 + 3500; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (int i = 0; i < 3500 + 3500; i++) | |
for (int i = 0; i < 7000; i++) |
@AlekseyTs probably need to skip the new test in the IOperation leg. |
@chsienki Please review. |
|
||
var generator = new PipelineCallbackGenerator(ctx => | ||
{ | ||
ctx.RegisterSourceOutput(ctx.SyntaxProvider.CreateSyntaxProvider((node, ct) => node is ClassDeclarationSyntax c, (context, ct) => context.Node).WithTrackingName("Syntax"), (context, ct) => { }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 It may help to also have a test that registers for LiteralExpressionSyntax
Fixes #59190.