-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Unittest compilation of std.string crash (Windows): too deep recursion #1297
Comments
|
(Perhaps the bug is not directly related to |
|
On merge-2.069 only, right? I'll investigate once I'm home (in 6+ hours). |
|
yeah. |
|
Perhaps it is an out-of-memory issue? I am able to turn the crash on/off by duplicating/removing the asserts around line 1220. |
|
|
Looks like an infinite recursion of |
|
I think I have found the problem: |
|
(in one case, the depth is >10000) |
|
@9rnsr Do you think it is possible to rewrite |
|
Oh wow. That most likely also expains why we're apparently hitting a rare LLVM bug (#930) when compiling the |
|
We do explicitly set the stack size for DMD on windows, since the default is too small. What is it set to in LDC? |
|
Thanks, found it: https://github.com/D-Programming-Language/dmd/blob/master/src/win32.mak#L285 |
|
Apparently the default stack size used by MSVC is a single MB. Linux uses 8, and that's what DMD chose on Windows as well. Let's go with the same size. |
|
Yes, it has nested template instantiation limits but they are set up for the 8MB stack. We use 8MB for dmd because I looked up the linux default and went with that. |
|
Mac also uses 8MB as default. |
|
Fixed in merge-2.069 branch |
On Windows, this stops compilation (
-w!) without any diagnostic:C:\projects\ninja-ldc\bin\ldc2.exe --output-o -c -IC:/projects/ldc/runtime/druntime/src -IC:/projects/ldc/runtime/druntime/src/gc C:/projects/ldc/runtime/phobos/std/string.d -ofC:/projects/ninja-ldc/runtime/std/string-unittest-debug.obj -w -d -link-debuglib -unittest -IC:/projects/ldc/runtime/phobosThe text was updated successfully, but these errors were encountered: