[LLVMbugs] [Bug 17334] New: crash instantiating ArrayRef in IRBuilder with -fdelayed-template-parsing

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 23 17:42:51 PDT 2013


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

            Bug ID: 17334
           Summary: crash instantiating ArrayRef in IRBuilder with
                    -fdelayed-template-parsing
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11271
  --> http://llvm.org/bugs/attachment.cgi?id=11271&action=edit
reduced test case

Clang asserts that DeclContexts aren't nested correctly on the attached test
case, which was reduced from a clang self-host.

$ ../build_debug/bin/clang-cl t.cpp
Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext
should be lexically contained in the current one.", file
..\tools\clang\lib\Sema\SemaDecl.cpp, line 893


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
-resource-dir D:\src\llvm\build_debug\bin\..\lib\clang\3.4 -internal-isystem
D:\src\llvm\build_debug\bin\..\lib\clang\3.4\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\build_clang -ferror-limit 19
-fmessage-length 0 -mstackrealign -fms-extensions -fms-compatibility
-fmsc-version=1700 -fdelayed-template-parsing -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -vectorize-slp -fcolor-diagnostics
-fansi-escape-codes -o D:\src\tmp\t-ae5bf6.obj -x c++ t.cpp
1.      <eof> parser at end of file
2.      t.cpp:36:8: instantiating function definition
'CreateConstInBoundsGEP2_32'
_NMSG_WRITE() + 0x8A bytes(s),
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0msg.c, line 226
abort() + 0x1C bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\abort.c, line
62 + 0x7 byte(s)
_wassert() + 0xBEC bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\assert.c,
line 355
clang::Sema::PushDeclContext() + 0x3F bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadecl.cpp, line 893 + 0x31 byte(s)
clang::Parser::ParseLateTemplatedFuncDef() + 0x367 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsetemplate.cpp, line 1297
clang::Parser::LateTemplateParserCallback() + 0xF bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsetemplate.cpp, line 1248
clang::Sema::InstantiateFunctionDefinition() + 0x22E bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiatedecl.cpp, line 3152 +
0x1B byte(s)
clang::Sema::MarkFunctionReferenced() + 0x5CF bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 11113
clang::Sema::BuildCXXConstructExpr() + 0x2E bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 10523
clang::Sema::BuildCXXConstructExpr() + 0xB8 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 10503 + 0x40 byte(s)
clang::InitializationSequence::Perform() + 0xF3B bytes(s),
d:\src\llvm\tools\clang\lib\sema\semainit.cpp, line 5814 + 0x58 byte(s)
clang::Sema::PerformCopyInitialization() + 0x129 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semainit.cpp, line 7065
clang::Sema::GatherArgumentsForCall() + 0x2AF bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 4139
clang::Sema::ConvertArgumentsForCall() + 0x9D3 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 4069 + 0x3E byte(s)
clang::Sema::BuildCallToMemberFunction() + 0x106E bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaoverload.cpp, line 11185 + 0x4A byte(s)
clang::Sema::ActOnCallExpr() + 0x584 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 4383 + 0x24 byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::RebuildCallExpr() + 0x3D bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 1598 + 0x2F byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCallExpr() + 0x16F bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 6722 + 0x3F byte(s)
`anonymous namespace'::TemplateInstantiator::TransformCallExpr() + 0x42
bytes(s), d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiate.cpp, line
904
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformExpr() + 0x570 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 299 + 0x20 byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt() + 0x609 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 2665
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt() + 0x8C bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 5270
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt() + 0x27 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 5255 + 0x19 byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt() + 0x1D4 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 79 + 0x20 byte(s)
clang::Sema::SubstStmt() + 0x6C bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiate.cpp, line 2614 + 0x10
byte(s)
clang::Sema::InstantiateFunctionDefinition() + 0x665 bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiatedecl.cpp, line 3253
clang::Sema::PerformPendingInstantiations() + 0x1F3 bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiatedecl.cpp, line 4339
clang::Sema::ActOnEndOfTranslationUnit() + 0x18C bytes(s),
d:\src\llvm\tools\clang\lib\sema\sema.cpp, line 614
clang::Parser::ParseTopLevelDecl() + 0xE8 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parser.cpp, line 580
clang::ParseAST() + 0x1B9 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parseast.cpp, line 144 + 0xC byte(s)
clang::ASTFrontendAction::ExecuteAction() + 0x101 bytes(s),
d:\src\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 476 + 0x30
byte(s)
clang::CodeGenAction::ExecuteAction() + 0x33B bytes(s),
d:\src\llvm\tools\clang\lib\codegen\codegenaction.cpp, line 441
clang::FrontendAction::Execute() + 0xAC bytes(s),
d:\src\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 378 + 0xF byte(s)
clang::CompilerInstance::ExecuteAction() + 0x263 bytes(s),
d:\src\llvm\tools\clang\lib\frontend\compilerinstance.cpp, line 708
clang::ExecuteCompilerInvocation() + 0x308 bytes(s),
d:\src\llvm\tools\clang\lib\frontendtool\executecompilerinvocation.cpp, line
238 + 0x11 byte(s)
cc1_main() + 0x2F0 bytes(s), d:\src\llvm\tools\clang\tools\driver\cc1_main.cpp,
line 100 + 0xE byte(s)
main() + 0x166 bytes(s), d:\src\llvm\tools\clang\tools\driver\driver.cpp, line
306 + 0x45 byte(s)
__tmainCRTStartup() + 0x11A bytes(s),
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c, line 241 + 0x19 byte(s)

-- 
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/20130924/437e1947/attachment.html>


More information about the llvm-bugs mailing list