Skip to content

Conversation

kinke
Copy link
Member

@kinke kinke commented Jan 20, 2017

No description provided.

@kinke kinke force-pushed the winStackTrace branch 4 times, most recently from d09c8e5 to 27f859b Compare January 21, 2017 21:04
@kinke
Copy link
Member Author

kinke commented Jan 22, 2017

32-bit AppVeyor hit a core.thread (release only) unittest segfault twice in a row...

@kinke
Copy link
Member Author

kinke commented Jan 22, 2017

The segfault happens when generating the stack trace in dbghelp.dll (CheckDirForPdbsEx()) when using the release libs, no need for -O (in fact, -O -link-debuglib works fine). Reproducible via ldc2 -g -unittest -main ldc\runtime\druntime\src\core\thread.d && thread.exe.

@kinke kinke force-pushed the winStackTrace branch 2 times, most recently from ffcb77a to 8662868 Compare January 22, 2017 15:47
@kinke
Copy link
Member Author

kinke commented Jan 22, 2017

Should be fixed now via string matching the first _d_throw_exception frame.

@kinke
Copy link
Member Author

kinke commented Jan 22, 2017

Resulting backtraces on Windows:

Win64, release libs

object.Exception@..\ldc\tests\codegen\exception_stack_trace.d(16): lala
----------------
0x00007FF6BCFD1097 in exception_stack_trace.bar at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(16)
0x00007FF6BCFD10AF in exception_stack_trace.foo at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(22)
0x00007FF6BCFD10D7 in D main at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(28)
0x00007FF6BCFD8F85 in d_run_main
0x00007FF6BCFD11A7 in __entrypoint.main at C:\LDC\ninja-ldc\__entrypoint.d(8)
0x00007FF6BCFE9665 in __scrt_common_main_seh at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(253)
0x00007FFB4F708364 in BaseThreadInitThunk
0x00007FFB4F8170D1 in RtlUserThreadStart

Win64, debug libs

object.Exception@..\ldc\tests\codegen\exception_stack_trace.d(16): lala
----------------
0x00007FF7B0101097 in exception_stack_trace.bar at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(16)
0x00007FF7B01010AF in exception_stack_trace.foo at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(22)
0x00007FF7B01010D7 in D main at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(28)
0x00007FF7B010D02A in rt.dmain2._d_run_main.runAll.__lambda1 at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(474)
0x00007FF7B010CEA1 in rt.dmain2._d_run_main.tryExec at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(449)
0x00007FF7B010CF73 in rt.dmain2._d_run_main.runAll at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(474)
0x00007FF7B010CEA1 in rt.dmain2._d_run_main.tryExec at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(449)
0x00007FF7B010CD3D in rt.dmain2._d_run_main at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(482)
0x00007FF7B01011A7 in __entrypoint.main at C:\LDC\ninja-ldc\__entrypoint.d(8)
0x00007FF7B0132BE5 in __scrt_common_main_seh at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(253)
0x00007FFB4F708364 in BaseThreadInitThunk
0x00007FFB4F8170D1 in RtlUserThreadStart

Win32, release libs

object.Exception@..\ldc\tests\codegen\exception_stack_trace.d(16): lala
----------------
0x009123E8 in ulong[] core.sys.windows.stacktrace.StackTrace.traceNoSync(uint, core.sys.windows.winnt.CONTEXT*)
0x00912192 in core.sys.windows.stacktrace.StackTrace core.sys.windows.stacktrace.StackTrace.__ctor(uint, core.sys.windows.winnt.CONTEXT*)
0x0090BDCC in object.Throwable.TraceInfo core.runtime.defaultTraceHandler(void*)

Win32, debug libs

object.Exception@..\ldc\tests\codegen\exception_stack_trace.d(16): lala
----------------
0x00F62CC2 in core.sys.windows.stacktrace.StackTrace.traceNoSync at C:\LDC\ldc\runtime\druntime\src\core\sys\windows\stacktrace.d(147)
0x00F62865 in core.sys.windows.stacktrace.StackTrace.trace at C:\LDC\ldc\runtime\druntime\src\core\sys\windows\stacktrace.d(115)
0x00F627E9 in core.sys.windows.stacktrace.StackTrace.this at C:\LDC\ldc\runtime\druntime\src\core\sys\windows\stacktrace.d(68)
0x00F410B8 in exception_stack_trace.foo at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(22)
0x00F410FB in D main at C:\LDC\ldc\tests\codegen\exception_stack_trace.d(28)
0x00F4BD91 in rt.dmain2._d_run_main.runAll.__lambda1 at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(474)
0x00F4BD06 in rt.dmain2._d_run_main.runAll at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(474)
0x00F4BB11 in rt.dmain2._d_run_main at C:\LDC\ldc\runtime\druntime\src\rt\dmain2.d(485)
0x00F411DE in __entrypoint.main at C:\LDC\ninja-ldc-x86\__entrypoint.d(8)
0x00F6F8C3 in __scrt_common_main_seh at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(253)
0x75F462C4 in BaseThreadInitThunk
0x773C0FD9 in RtlSubscribeWnfStateChangeNotification
0x773C0FA4 in RtlSubscribeWnfStateChangeNotification

@kinke kinke merged commit b5d1ae2 into ldc-developers:master Jan 22, 2017
@kinke kinke deleted the winStackTrace branch January 22, 2017 18:01
@dnadlinger
Copy link
Member

Nice!

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.

2 participants