[LLVMbugs] [Bug 18232] New: clang-cl crashes during template instantiation inside the MSVC 2012 ppltasks.h header

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 12 14:21:49 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=18232

            Bug ID: 18232
           Summary: clang-cl crashes during template instantiation inside
                    the MSVC 2012 ppltasks.h header
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Filing so it can be tracked and reduced.

$ cat t.cpp
#include <ppltasks.h>

$ clang-cl t.cpp -c
In file included from t.cpp:1:
In file included from C:/PROGRA~2/MICROS~1.0/VC/include\ppltasks.h:21:
C:/PROGRA~2/MICROS~1.0/VC/include\ppl.h(4151,4) :  error: 'mutable' cannot be
applied to references
    mutable _Combinable_type &_Combinable;
    ^
Only ClassTemplatePartialSpecializationDecls occurinside templates
UNREACHABLE executed at
..\tools\clang\lib\Sema\SemaTemplateInstantiateDecl.cpp:2325!
Stack dump:
0.      Program arguments: D:\src\llvm\build_debug\bin\clang-cl.exe -cc1
-triple i686-pc-win32 -emit-obj -mrelax-all -disable-free -main-file-name t.cpp
-mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -D_MT --dependent-lib=libcmt
--dependent-lib=oldnames -cxx-abi microsoft -fdiagnostics-format msvc
-coverage-file D:\src\llvm\tools\clang\t.obj -resource-dir
D:\src\llvm\build_debug\bin\..\lib\clang\3.5 -internal-isystem
D:\src\llvm\build_debug\bin\..\lib\clang\3.5\include -internal-isystem
C:/PROGRA~2/MICROS~1.0/VC/include -internal-isystem
C:/PROGRA~2/WI3CF2~1/8.0/Include/shared -internal-isystem
C:/PROGRA~2/WI3CF2~1/8.0/Include/um -internal-isystem
C:/PROGRA~2/WI3CF2~1/8.0/Include/winrt -internal-isystem
C:/PROGRA~2/MICROS~1.0/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir D:\src\llvm\tools\clang -ferror-limit 19
-fmessage-length 0 -mstackrealign -fms-extensions -fms-compatibility
-fmsc-version=1700 -fdelayed-template-parsing -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-slp
-fcolor-diagnostics -fansi-escape-codes -o t.obj -x c++ t.cpp
1.      C:/PROGRA~2/MICROS~1.0/VC/include\ppltasks.h:4156:42: current parser
token ';'
2.      C:/PROGRA~2/MICROS~1.0/VC/include\ppltasks.h:80:1: parsing namespace
'Concurrency'
3.      C:/PROGRA~2/MICROS~1.0/VC/include\ppltasks.h:3622:1: parsing
struct/union/class body 'task'
0x01FE5AEA (0x0000000A 0x00000000 0x0429A4B4 0x00D7B095), _NMSG_WRITE() + 0x8A
bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\crt0msg.c, line 226
0x01FCF3BC (0x0429A4CC 0x016C01E2 0x032AF840 0x032AF054), abort() + 0x1C
bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\abort.c, line 62 + 0x7 byte(s)
0x00D7B095 (0x032AF840 0x032AF054 0x00000915 0x0429A730),
llvm::llvm_unreachable_internal() + 0x85 bytes(s),
d:\src\llvm\lib\support\errorhandling.cpp, line 105
0x016C01E2 (0x07CB2DE0 0x0000001D 0x0429A730 0x0429A850),
clang::TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl() + 0x22
bytes(s), d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiatedecl.cpp,
line 2326
0x0162EF0F (0x07CB2DE0 0x0429AC58 0x0429A870 0xCCCCCCCC),
clang::declvisitor::Base<clang::declvisitor::make_ptr,clang::TemplateDeclInstantiator,clang::Decl
*>::Visit() + 0x22F bytes(s),
d:\src\llvm\tools\clang\include\clang\ast\declvisitor.h, line 237 + 0xC byte(s)
0x016026E7 (0x000320F4 0x07CCBC80 0x07CAFC10 0x0429A8F4),
clang::Sema::InstantiateClass() + 0x357 bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiate.cpp, line 2068 + 0x19
byte(s)
0x01603874 (0x000320F4 0x07CCBC80 0x00000001 0x00000001),
clang::Sema::InstantiateClassTemplateSpecialization() + 0x5E4 bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiate.cpp, line 2448 + 0x37
byte(s)
0x0155DFAF (0x000320F4 0x07CCBD30 0x0429AE08 0x0429E3A0),
clang::Sema::RequireCompleteTypeImpl() + 0x36F bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematype.cpp, line 5192 + 0x35 byte(s)
0x0155E2FC (0x000320F4 0x07CCBD30 0x0429AE08 0xCCCCCCCC),
clang::Sema::RequireCompleteType() + 0x2C bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematype.cpp, line 5097 + 0x14 byte(s)
0x0155E3C3 (0x000320F4 0x07CCBD30 0x000007EA 0x0429B194),
clang::Sema::RequireCompleteType() + 0x43 bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematype.cpp, line 5244 + 0x14 byte(s)
0x013033CD (0x0796A2AC 0x07CCBD30 0x07CCBD90 0x07CC8AC0),
clang::Sema::CheckFieldDecl() + 0xBD bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadecl.cpp, line 11437 + 0x15 byte(s)
0x013031E4 (0x0457C4A8 0x07CC8AC0 0x000320F4 0x0429B7FC),
clang::Sema::HandleField() + 0x3C4 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadecl.cpp, line 11387 + 0x47 byte(s)
0x0134F4B8 (0x0457C4A8 0x00000002 0x0429B7FC 0x00000000),
clang::Sema::ActOnCXXMemberDeclarator() + 0x8E8 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 2039 + 0x30 byte(s)
0x012700F6 (0x00000002 0x00000000 0x0429BF18 0x00000000),
clang::Parser::ParseCXXClassMemberDeclaration() + 0x10F6 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsedeclcxx.cpp, line 2304 + 0x47 byte(s)
0x0126EAD4 (0x0002AA93 0x0002AA99 0x0429C840 0x00000012),
clang::Parser::ParseCXXMemberSpecification() + 0x9E4 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsedeclcxx.cpp, line 2690
0x0126DCD0 (0x0000007C 0x0002AA93 0x0429D2D8 0x0429D47C),
clang::Parser::ParseClassSpecifier() + 0x16B0 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsedeclcxx.cpp, line 1615
0x01223C34 (0x0429D2D8 0x0429D47C 0x00000003 0x00000004),
clang::Parser::ParseDeclarationSpecifiers() + 0x16B4 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsedecl.cpp, line 3243
0x0121785D (0x00000000 0x0429D47C 0x0429D554 0x0429DA4C),
clang::Parser::ParseSingleDeclarationAfterTemplate() + 0x11D bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsetemplate.cpp, line 195
0x012175DE (0x00000000 0x0429DA4C 0x00000003 0x00000000),
clang::Parser::ParseTemplateDeclarationOrSpecialization() + 0x39E bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsetemplate.cpp, line 150 + 0x42 byte(s)
0x012171EE (0x00000000 0x0429DA4C 0x00000003 0x00000000),
clang::Parser::ParseDeclarationStartingWithTemplate() + 0xAE bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsetemplate.cpp, line 39 + 0x18 byte(s)
0x01220093 (0x0429DAD4 0x0429D9B8 0x00000000 0x0429DA4C),
clang::Parser::ParseDeclaration() + 0x93 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsedecl.cpp, line 1436 + 0x14 byte(s)
0x012087CE (0x0429DAD4 0x0429DAEC 0x00000000 0x0429DED8),
clang::Parser::ParseExternalDeclaration() + 0x5Aclang-cl.exe: error: clang
frontend command failed due to signal (use -v to see invocation)
clang version 3.5
Target: i686-pc-win32
Thread model: posix
clang-cl.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.
BuildJobsForAction
clang-cl.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-cl.exe: note: diagnostic msg: D:\src\tmp\t-471543.cpp
clang-cl.exe: note: diagnostic msg: D:\src\tmp\t-471543.sh
clang-cl.exe: note: diagnostic msg:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131212/79ba9544/attachment.html>


More information about the llvm-bugs mailing list