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

Do not use SyntaxWalker to visit an arbitrary syntax tree in order to avoid a stack overflow. #59203

Merged
merged 2 commits into from
Feb 2, 2022

Conversation

AlekseyTs
Copy link
Contributor

@AlekseyTs AlekseyTs commented Feb 1, 2022

Fixes #59190.

public static readonly string F = ""a""
";

for (int i = 0; i < 3500 + 3500; i++)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i = 0; i < 3500 + 3500; i++)
for (int i = 0; i < 7000; i++)

@333fred
Copy link
Member

333fred commented Feb 2, 2022

@AlekseyTs probably need to skip the new test in the IOperation leg.

@AlekseyTs
Copy link
Contributor Author

@chsienki Please review.

@AlekseyTs AlekseyTs merged commit 62ef6c0 into dotnet:main Feb 2, 2022
@ghost ghost added this to the Next milestone Feb 2, 2022

var generator = new PipelineCallbackGenerator(ctx =>
{
ctx.RegisterSourceOutput(ctx.SyntaxProvider.CreateSyntaxProvider((node, ct) => node is ClassDeclarationSyntax c, (context, ct) => context.Node).WithTrackingName("Syntax"), (context, ct) => { });
Copy link
Member

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

@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P1 Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visual Studio 2022 crashes for certain solution after setting net6.0 instead of net5.0
5 participants