-
Notifications
You must be signed in to change notification settings - Fork 763
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
WIP Try to reproduce #1536 #1537
Conversation
urghs this seems to happen in some COM component ISymUnmanagedWriter2 in method CloseMethod |
f4bdebc
to
7b0c127
Compare
Ok this actually happening in ISymUnmanagedWriter2 when we add more then ~475 level deep scopes. In ce077ea we keep track how deep we are in the scoping level and just skip the rest. This is probably not the the final solution, but at least we don't fail compiler when we write PDBs. |
@dsyme I just looked into a C# file with over 500 variables in a file. They just put that in the same scope so nobody ever noticed this ;-) |
This feels like a regression (?), if so we need to check the root cause and test coverage. |
It's only happens when optimizer is disabled but debug is enabled. I assume methodsplitting stuff worked around this issue. |
7b0c127 is still green, but when running "build.cmd all" locally I see the stackoverflow happening. It's just that the fsharpQA suite doesn't care and goes on after a while. |
@enricosada any ideas where we can make fsharpqa stop on compiler throwing stackoverflow!? |
@forki the perl script should check the exit code of compiler, is not doing that?| |
@enricosada I guess the thing is not exiting at all |
fun fact: the compiler is emitting the exe for the sample and crashes after that. fsharpqa goes on with it's life. b62f97c reproduced it indirectly by running the exe (which is broken). |
Ok I think this a good enough test. Without the fix the CI is red and with fix applied it's green. Ready for review |
I rewrote @estokes sample (including nested scopes) in C# NestedScopes.zip and compiling/debugging works well. So there must exist a real solution. Does anyone know where the C# pdb writer puts scopes and local variables into methods? /cc @jaredpar |
@dsyme something weird is happening here. We have one scope level per variable but the nesting is not ordered like the variables in the source file. I'm not sure if this is the root cause here, but it's definitely weird. |
@forki if you like I will take a look at this ... unless you want to follow up? |
Can't look at it before Monday. Have to run hipster F# conference at the Am 16.09.2016 7:09 nachm. schrieb "Kevin Ransom (msft)" <
|
I'm too old to do anything hipster ... so I suggest you have a good time. |
This is not a regression, this is using the oldest preview compiler on codeplex : c:\temp\foo>"c:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Fsc.exe" --debug:full --optimize- foo.fs .... Process is terminated due to StackOverflowException. c:\temp\foo> Interestingly it only happens when --optimize- is specified. Kevin |
Yeah I'm already convinced optimizer is doing something so that this would Am 16.09.2016 21:41 schrieb "Kevin Ransom (msft)" <notifications@github.com
|
Okay I have a PR with a slightly different fix: #1545 The fix merges nested scopes that have the same dimensions. |
This reproduces the bug from #1536