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 from recursion in debug code built with .NET SDK 6 #12645

Closed
charlieturndorf opened this issue Jan 26, 2022 · 3 comments
Closed
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.

Comments

@charlieturndorf
Copy link

charlieturndorf commented Jan 26, 2022

A recursive function isn't getting properly tailcalled when built with .NET SDK 6 in debug mode. This leads to a stack overflow. The same code has been working with no issue since at least .NET Core 2.1.

Repro steps

For a minimal repro with instructions, see charlieturndorf/crashrepro-netsdk6-tailoverflow

Expected behavior

The function should recurse an arbitrary number of times without overflow (10k recursions in the repro provided).

Actual behavior

A stack overflow tears down the process.

Known workarounds

  • Build with .NET SDK 6.0.101 in release mode
  • Build with .NET SDK 5.0.404 or lower

Related information

Possibly related to #12413; or, at the very least, probably related to the addition of pipeline debugging.

@KevinRansom KevinRansom added the Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. label Jan 26, 2022
@dsyme
Copy link
Contributor

dsyme commented Jan 31, 2022

Yes, looking at the code I'm convinced this is a duplicate of #12413

@dsyme
Copy link
Contributor

dsyme commented Jan 31, 2022

We need to validate this is fixed in main

@dsyme
Copy link
Contributor

dsyme commented Mar 3, 2022

I've verified this is fixed in main

@dsyme dsyme closed this as completed Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
None yet
Development

No branches or pull requests

3 participants