On Friday, 12 July 2019 at 22:46:11 UTC, Anonymouse wrote:
I'm suddenly getting segfaults when running tests on Windows. It works fine on Linux. I reduced it to a few lines (plus a dependency) with dustmite, but they don't really make sense[1]. Nevertheless they do trigger the segfault.

Can someone with Windows 10 and dmd 2.087.0 try the following and see if it crashes please?

git clone https://github.com/zorael/tests -b wintestcrash && cd tests && dub test

I can reproduce it on Win10/x64 (qemu).
But it's really hard to debug on windows (at least with dmd and no V.Studio), I could only get a readable backtrace with "WinDbg Preview" debugger:

[0x0]   msvcr100!_output_l + 0x41e
[0x1]   msvcr100!printf + 0x7c
[0x2] test!int core.runtime.runModuleUnitTests().__foreachbody1(object.ModuleInfo*) + 0xd1 [0x3] test!int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)).__lambda2(immutable(object.ModuleInfo*)) + 0x27 [0x4] test!int rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*))).__foreachbody2(ref rt.sections_win64.SectionGroup) + 0x54 [0x5] test!int rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*))) + 0x1f [0x6] test!int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)) + 0x27
[0x7]   test!runModuleUnitTests + 0xfe
...
msvcr100!_output_l+0x41e:
00000000`62e0346e 443811 cmp byte ptr [rcx],r10b ds:00000000`00000010=??
Registers are: rcx = 0x0000000000000010, r10 = 0x0000000000000000
it seems like ( str[i] == '\0')

So the program try to print from an invalid pointer and the StackTrace/Throwable object is somewhat related.

Reply via email to