[swift-dev] Help swift-clang on Windows crashes (2016-06-06)

Sangjin Han tinysun.net at gmail.com
Tue Jun 14 18:17:03 CDT 2016


Hi, everyone.

I built clang compiler on Windows (MSVC) from apple/swift-clang and
apple/swift-llvm of github. That worked fine when used the tag
'swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a'.

But, in case of recent snapshots of 2016-05-31, 2016-06-06, the compiler
couldn't compile even the standard headers.
The crashed sample source has only included <string>.
------------
#include <string>
------------

I factored the crashing part.

----BEGIN OF TestCode.cpp--------
template<class T>
class dummy {};

template<class T>
class Foo
{
public:
  virtual dummy<int> bar()
  {
    return dummy<int>();
  }
  virtual ~Foo() {}
};

template class Foo<int>;
----END-----

The compiler can generates the TestCode.ast with -emit-ast option, but can
not generates TestCode.obj.

I captured the output of the compiler.

clang  -fms-compatibility-version=19 -c TestCode.cpp

#0 0x00007ff6dc515d83
(C:\Work\swift_msvc\build\NinjaMSVC\llvm\Release\bin\clang.exe+0xaa5d83)
#1 0x00007ff6dc50d5f3
(C:\Work\swift_msvc\build\NinjaMSVC\llvm\Release\bin\clang.exe+0xa9d5f3)
.....
#24 0x00007ff6dd7e75ec
(C:\Work\swift_msvc\build\NinjaMSVC\llvm\Release\bin\clang.exe+0x1d775ec)
#25 0x00007ffd371a8102 BaseThreadInitThunk
(C:\WINDOWS\system32\KERNEL32.DLL+0x18102)
#26 0x00007ffd37c4c5b4 RtlUserThreadStart
(C:\WINDOWS\SYSTEM32\ntdll.dll+0x5c5b4)
clang.exe: error: clang frontend command failed due to signal (use -v to
see invocation)
clang version 3.9.0 (https://github.com/apple/swift-clang
cb7d619933534f63ae31a0a8c392bf2f681391c1) (
https://github.com/apple/swift-llvm
cec921ea635adf6f87febee5ad59d3bacb952ef9)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Work\swift_msvc\build\NinjaMSVC\llvm\Release\bin
clang.exe: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source,
and associated run script.
clang.exe: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang.exe: note: diagnostic msg:
C:\Users\Han\AppData\Local\Temp\TestCode-69db08.cpp
clang.exe: note: diagnostic msg:
C:\Users\Han\AppData\Local\Temp\TestCode-69db08.sh
clang.exe: note: diagnostic msg:

********************


Han Sangjin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160615/a1d85e7b/attachment.html>


More information about the swift-dev mailing list