[llvm-bugs] [Bug 40791] New: Crash in template code that
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 20 10:54:02 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40791
Bug ID: 40791
Summary: Crash in template code that
Product: new-bugs
Version: 7.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: daparks at mozilla.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 21496
--> https://bugs.llvm.org/attachment.cgi?id=21496&action=edit
Build log with crash stack
Unfortunately, I haven't been able to reproduce this crash with a small test
case and it comes from building a "unified source file" (ie many files smooshed
together) from the Firefox code base so its not small. I have isolated the
crash to a method A that passes a method pointer P to another method B, where
B's signature pulls apart the method's components (return type, class type,
arguments). Method A is in a templated class's templated (specialized)
inner-class. One of method A's templates is the type of the method-pointer P.
Those are the properties that I would have guessed were relevant to the crash
but, as I said, I can't seem to get a smaller version to crash. So I really
have no idea what the cause is. I just know that removing these method calls
eliminates the crash.
In the attached source file, the method A's (they are two related methods) are
on lines 1277373 and 1277382. The are called by the DEFINE_METHOD_DISPATCHER
just below them and that macro is instantiated at line 1282214.
>From the crash log:
0:56.32 Wrote crash dump file
"C:\Users\DAVIDP~1\AppData\Local\Temp\clang-cl.exe-121290.dmp"
0:56.85 LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.
Make sure the file exists and is readable. Calling loadDataForExe
0:56.85 LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.
Make sure the file exists and is readable. Calling loadDataForExe
0:56.86 #0 0x00007ff7f216ffe0 clang::CallExpr::getCallReturnType(class
clang::ASTContext const &)const
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x266ffe0)
0:56.86 #1 0x00007ff7f0caed0d
clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(class llvm::Value
*,class llvm::ArrayRef<class llvm::Value *>,bool,bool,class
clang::SourceLocation,class llvm::Twine const &)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x11aed0d)
0:56.86 #2 0x00007ff7f0c9fc81
clang::CodeGen::CodeGenFunction::EmitScalarExpr(class clang::Expr const *,bool)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x119fc81)
0:56.86 #3 0x00007ff7f0c5687c
clang::CodeGen::CodeGenFunction::EmitReturnStmt(class clang::ReturnStmt const
&) (c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x115687c)
0:56.86 #4 0x00007ff7f0c53831 clang::CodeGen::CodeGenFunction::EmitStmt(class
clang::Stmt const *,class llvm::ArrayRef<class clang::Attr const *>)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x1153831)
0:56.86 #5 0x00007ff7f0c5c595
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(class
clang::CompoundStmt const &,bool,class clang::CodeGen::AggValueSlot)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x115c595)
0:56.86 #6 0x00007ff7f0b895ce
clang::CodeGen::CodeGenFunction::EmitFunctionBody(class
clang::CodeGen::FunctionArgList &,class clang::Stmt const *)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x10895ce)
0:56.86 #7 0x00007ff7f0b89e9f
clang::CodeGen::CodeGenFunction::GenerateCode(class clang::GlobalDecl,class
llvm::Function *,class clang::CodeGen::CGFunctionInfo const &)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x1089e9f)
0:56.86 #8 0x00007ff7f0a2caab
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(class
clang::GlobalDecl,class llvm::GlobalValue *)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0xf2caab)
0:56.86 #9 0x00007ff7f0a272d7
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(class
clang::GlobalDecl,class llvm::GlobalValue *)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0xf272d7)
0:56.86 #10 0x00007ff7f0a1eed3
clang::CodeGen::CodeGenModule::EmitDeferred(void)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0xf1eed3)
0:56.86 #11 0x00007ff7f0a1e1f1 clang::CodeGen::CodeGenModule::Release(void)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0xf1e1f1)
0:56.86 #12 0x00007ff7f24f3655 clang::CreateLLVMCodeGen(class
clang::DiagnosticsEngine &,class llvm::StringRef,class
clang::HeaderSearchOptions const &,class clang::PreprocessorOptions const
&,class clang::CodeGenOptions const &,class llvm::LLVMContext &,class
clang::CoverageSourceInfo *)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x29f3655)
0:56.86 #13 0x00007ff7f24f1854
clang::BackendConsumer::HandleTranslationUnit(class clang::ASTContext &)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x29f1854)
0:56.86 #14 0x00007ff7f17802d4 clang::ParseAST(class clang::Sema &,bool,bool)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x1c802d4)
0:56.86 #15 0x00007ff7f0e73f4d clang::FrontendAction::Execute(void)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x1373f4d)
0:56.86 #16 0x00007ff7f0e38af7 clang::CompilerInstance::ExecuteAction(class
clang::FrontendAction &)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x1338af7)
0:56.86 #17 0x00007ff7f0eda52c clang::ExecuteCompilerInvocation(class
clang::CompilerInstance *)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x13da52c)
0:56.86 #18 0x00007ff7efb06d12 std::_Tree<class std::_Tmap_traits<struct
llvm::MCContext::WasmSectionKey,class llvm::MCSectionWasm *,struct
std::less<struct llvm::MCContext::WasmSectionKey>,class std::allocator<struct
std::pair<struct llvm::MCContext::WasmSectionKey const ,class
llvm::MCSectionWasm *> >,0> >::erase(class std::_Tree_const_iterator<class
std::_Tree_val<struct std::_Tree_simple_types<struct std::pair<struct
llvm::MCContext::WasmSectionKey const ,class llvm::MCSectionWasm *> > > >)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x6d12)
0:56.86 #19 0x00007ff7efb041cc
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x41cc)
0:56.86 #20 0x00007ff7f26a53bd llvm::microsoftDemangle(char const *,char
*,unsigned __int64 *,int *)
(c:\Users\DAVIDP~1\MOZBUI~1\clang\bin\clang-cl.exe+0x2ba53bd)
0:56.86 #21 0x00007fff174c3dc4 (C:\WINDOWS\System32\KERNEL32.DLL+0x13dc4)
0:56.86 #22 0x00007fff19893691 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x73691)
0:56.95 clang-cl.exe: error: clang frontend command failed due to signal (use
-v to see invocation)
0:56.95 clang version 7.0.0 (tags/RELEASE_700/final 342383)
0:56.95 Target: x86_64-pc-windows-msvc
0:56.95 Thread model: posix
--
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/20190220/df4c96ac/attachment-0001.html>
More information about the llvm-bugs
mailing list