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 fix #10868

Merged
merged 6 commits into from
Jan 15, 2021
Merged

Stack-overflow fix #10868

merged 6 commits into from
Jan 15, 2021

Conversation

TIHan
Copy link
Contributor

@TIHan TIHan commented Jan 13, 2021

#10443

I'm not sure exactly why this is stack-overflowing, but it's related to a stack-overflow fix that I made about a year ago when delaying method gen in a queue.

The change basically delays the direct call of the code-gen for an expression on a method, instead of delaying the code-gen of the method itself. This is done by changing MethodBody.IL to use a Lazy<ILMethodBody> - this also allows the removal of ILLazyMethodBody as MethodBody.IL will always contain a Lazy<ILMethodBody>.

@TIHan
Copy link
Contributor Author

TIHan commented Jan 14, 2021

Tests that are failing are just the surface area. Will update those.

@TIHan TIHan changed the title [WIP] Stack-overflow fix Stack-overflow fix Jan 14, 2021
@cartermp
Copy link
Contributor

Yes, Will update those indeed. Badum-tisshhh

@TIHan TIHan linked an issue Jan 15, 2021 that may be closed by this pull request
Copy link
Member

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

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

Looks good.

@TIHan TIHan merged commit 1952c47 into dotnet:main Jan 15, 2021
cartermp pushed a commit to cartermp/fsharp that referenced this pull request Jan 21, 2021
* Backing out stackoverflow fix by delayed gen methods

* Trying to lazily gen IL

* Making ILMethodBody.IL be lazy

* Consolidating lazy methodbodies by removing ILLazyMethodBody

* Updating baseline and fixing build

* Minor change
cartermp added a commit that referenced this pull request Jan 21, 2021
Cherry Pick into 16.9 - Stack-overflow fix (#10868)
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* Backing out stackoverflow fix by delayed gen methods

* Trying to lazily gen IL

* Making ILMethodBody.IL be lazy

* Consolidating lazy methodbodies by removing ILLazyMethodBody

* Updating baseline and fixing build

* Minor change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FSC.exe StackOverflow when building in release (Optimize = true)
3 participants