-
Notifications
You must be signed in to change notification settings - Fork 785
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
fsc.exe exited with code -1073741571 (StackOverflowException with big literal list) VS2019 Preview 3 #6258
Comments
Can confirm. This is a pretty bad one. |
This also happens in preview 3 for huge Repro
This is a regression, since it works in VS2017. |
@dsyme any ideas? |
I don't know of anything specific that would have caused this |
cc @KevinRansom @brettfo looks like we have some investigative work to do here |
The problem is similar to #6222 - fsc.exe is now a 64-bit process, and hence consuming more stack. Adding
fixes the problem and restores compat. Would be interesting to know the coreclr compiler's behaviour here. The general problem is that the input sizes accepted in various dimensions are determined partly by available process stack - they are not precisely specified nor do we test to precise numbers and fail above those numbers). Instead historically we've been able to remove these limits when we've encountered them by moving more stack to the heap for certain operations (e.g. collecting free variables down long chains of I suppose we should
|
Gotcha, so in terms of the immediate problem #6223 resolves it, but we likely need to do work to make it solved better? |
@dsyme, Alternatively, perhaps we can just increase the stack size of the fsc process? I know that's a bit of a sledge hammer approach, but it allows us to continue using the 64 bit version, which has other advantages like allowing for more heap space. |
we should handle it without blowing the stack, and fix any others as we find them. I thought it was suspicious that the limit was 500, that is such an unusual computer number. Coreclr stack overflows, 64 bit is the usual coreclr distribution. |
For Desktop compat it seems best to move back to 32bit. There are likely to be several such cases and I'm not sure it's worth our time to track thrm down one by one, with no workaround for the user (on netcore people have the workaround of using the desktop compiler). We didn't make this change deliberately. Also some desktop type providers may also be 32bit dependent, so moving to 64bit fsc.exe is really a breaking change. We should certainly also fix each case as we find them to support arbitrary sized inputs. |
In this particular case, the stack overflow is in
|
Compat fix for this is in for desktop fsc.exe, so I'll close this out. #6294 is a more general fix for 32-bit and 64-bit, the latter of which will remain the assumed default for most people (since 64-bit .NET Core is what most people use). |
Having upgraded to VS2019 16.1.0 to get this fix, I'm getting an error of |
@pauldorehill you should probably log that as a separate bug, it may not be related to this one |
@pauldorehill That sounds separate from this. Can you file an issue and supply a repro? Thanks! |
@cartermp I'm happy to file a repo, but I'll have to see if I can come up with some similar code as its for an internal app where I can't really share the code (this may take some time). I can compile the project using netcore (64bit) in both release & debug - its a set of generated files some of which are pretty large. |
Creating a large list in a source literal breaks the compiler
Repro steps
Compile the following code:
continue this for another 400 lines
TestData.zip
Expected behavior
A large (and boring) list is created
Actual behavior
The compiler terminates
Known workarounds
Create the list programmatically
Related information
Provide any related information
The text was updated successfully, but these errors were encountered: