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

Stack overflow during project build #64453

Closed
mokshinpv opened this issue Oct 3, 2022 · 4 comments
Closed

Stack overflow during project build #64453

mokshinpv opened this issue Oct 3, 2022 · 4 comments
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@mokshinpv
Copy link

mokshinpv commented Oct 3, 2022

Version Used: dotnet\sdk\6.0.401

Steps to Reproduce:

  1. Rebuild attached project in VS Community 2022 17.3.5:
    academitslearn2.zip
  2. Getting stack overflow error

Expected Behavior: Code compiles.

Actual Behavior: Code doesn't compile.

Workaround: All worked in some old version of VS Community 2022.
Probably was old version of .NET SDK.

This project uses ANTLR which generates large classes.
I think somewhere Roslyn uses recursion which can't handle such large classes.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 3, 2022
@CyrusNajmabadi
Copy link
Member

@mokshinpv can you please supply the stack you're getting when the overflow happens?

@mokshinpv
Copy link
Author

mokshinpv commented Oct 3, 2022

@CyrusNajmabadi, VS doesn't show it, here is stack from Rider (attached in file).
stack.txt
Stack is large so can't copy it as text here.

@CyrusNajmabadi
Copy link
Member

Thanks. Fixed with #64322.

@monty241
Copy link

monty241 commented Oct 12, 2022

Same issue: SO, also only on the project with generated Antlr4 code in build.

Seems to happen only with some grammars. On a previously release with maybe 100 lines less of G4 definitions, but still a considerably large grammar, the MSBuild.exe does not trigger SO.

Tested msbuild also with preview of build tools 17.4.0 Preview 3, still StackOverflow. Co-worker will append repro to related open issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

3 participants