[llvm-bugs] [Bug 46738] New: Crash with out of line defaulted constructor

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 15 11:14:20 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46738

            Bug ID: 46738
           Summary: Crash with out of line defaulted constructor
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dmajor at mozilla.com
                CC: froydnj at gmail.com, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

This is present in trunk 11 as well as clang 9 and 10, maybe even earlier but I
haven't tested.

class c;
class B {
  unsigned __stdcall d(c);
  B();
};
B::B() = default;

clang -cc1 -triple i686-w64-windows-gnu -emit-obj -debug-info-kind=limited
-fms-extensions reduced.cpp

1.      <eof> parser at end of file
2.      reduced.cpp:6:4: LLVM IR generation of declaration 'B::B'
3.      reduced.cpp:6:4: Generating code for declaration 'B::B'
 #0 0x00007ff72bd41a5e `anonymous
namespace'::ItaniumRecordLayoutBuilder::InitializeLayout
D:\src\llvm-project-11\clang\lib\AST\RecordLayoutBuilder.cpp:1257:0
 #1 0x00007ff72bd3b38a clang::ASTContext::getASTRecordLayout(class
clang::RecordDecl const *) const
D:\src\llvm-project-11\clang\lib\AST\RecordLayoutBuilder.cpp:3108:0
 #2 0x00007ff72b0ef833 clang::ASTContext::getTypeInfoImpl(class clang::Type
const *) const D:\src\llvm-project-11\clang\lib\AST\ASTContext.cpp:2234:0
 #3 0x00007ff72b0f0aaa clang::ASTContext::getTypeInfo(class clang::Type const
*) const D:\src\llvm-project-11\clang\lib\AST\ASTContext.cpp:1868:0
 #4 0x00007ff72baf7506 clang::MangleContext::mangleName(class
clang::GlobalDecl, class llvm::raw_ostream &)
D:\src\llvm-project-11\clang\lib\AST\Mangle.cpp:216:0
 #5 0x00007ff72b03b9ea getMangledNameImpl
D:\src\llvm-project-11\clang\lib\CodeGen\CodeGenModule.cpp:1069:0
 #6 0x00007ff72b036636 clang::CodeGen::CodeGenModule::getMangledName(class
clang::GlobalDecl)
D:\src\llvm-project-11\clang\lib\CodeGen\CodeGenModule.cpp:1171:0
 #7 0x00007ff72b07b1ed
clang::CodeGen::CGDebugInfo::CreateCXXMemberFunction(class clang::CXXMethodDecl
const *, class llvm::DIFile *, class llvm::DIType *)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:1603:0
 #8 0x00007ff72b07bde0
clang::CodeGen::CGDebugInfo::CollectCXXMemberFunctions(class
clang::CXXRecordDecl const *, class llvm::DIFile *, class
llvm::SmallVectorImpl<class llvm::Metadata *> &, class llvm::DIType *)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:1753:0
 #9 0x00007ff72b07ebfe clang::CodeGen::CGDebugInfo::CreateTypeDefinition(class
clang::RecordType const *)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:2383:0
#10 0x00007ff72b07f2ba clang::CodeGen::CGDebugInfo::CreateType(class
clang::RecordType const *)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:2338:0
#11 0x00007ff72b074136 clang::CodeGen::CGDebugInfo::getOrCreateType(class
clang::QualType, class llvm::DIFile *)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:3130:0
#12 0x00007ff72b073d72 clang::CodeGen::CGDebugInfo::getContextDescriptor(class
clang::Decl const *, class llvm::DIScope *)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:223:0
#13 0x00007ff72b08410f
clang::CodeGen::CGDebugInfo::collectFunctionDeclProps(class clang::GlobalDecl,
class llvm::DIFile *, class llvm::StringRef &, class llvm::StringRef &, class
llvm::DIScope *&, class llvm::MDTupleTypedArrayWrapper<class llvm::DINode> &,
enum llvm::DINode::DIFlags &)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:0:0
#14 0x00007ff72b086243 clang::CodeGen::CGDebugInfo::EmitFunctionStart(class
clang::GlobalDecl, class clang::SourceLocation, class clang::SourceLocation,
class clang::QualType, class llvm::Function *, bool, class
clang::CodeGen::CGBuilderTy &)
D:\src\llvm-project-11\clang\lib\CodeGen\CGDebugInfo.cpp:3782:0
#15 0x00007ff72ba98049 clang::CodeGen::CodeGenFunction::StartFunction(class
clang::GlobalDecl, class clang::QualType, class llvm::Function *, class
clang::CodeGen::CGFunctionInfo const &, class clang::CodeGen::FunctionArgList
const &, class clang::SourceLocation, class clang::SourceLocation)
D:\src\llvm-project-11\clang\lib\CodeGen\CodeGenFunction.cpp:949:0
#16 0x00007ff72ba9a59d clang::CodeGen::CodeGenFunction::GenerateCode(class
clang::GlobalDecl, class llvm::Function *, class clang::CodeGen::CGFunctionInfo
const &) D:\src\llvm-project-11\clang\lib\CodeGen\CodeGenFunction.cpp:1291:0
#17 0x00007ff72bb3c78a clang::CodeGen::CodeGenModule::codegenCXXStructor(class
clang::GlobalDecl) D:\src\llvm-project-11\clang\lib\CodeGen\CGCXX.cpp:215:0
#18 0x00007ff72b96e0b4 `anonymous namespace'::ItaniumCXXABI::emitCXXStructor
D:\src\llvm-project-11\clang\lib\CodeGen\ItaniumCXXABI.cpp:4155:0
#19 0x00007ff72b042bdc
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(class clang::GlobalDecl,
class llvm::GlobalValue *)
D:\src\llvm-project-11\clang\lib\CodeGen\CodeGenModule.cpp:2876:0
#20 0x00007ff72b046289 clang::CodeGen::CodeGenModule::EmitGlobal(class
clang::GlobalDecl)
D:\src\llvm-project-11\clang\lib\CodeGen\CodeGenModule.cpp:2642:0
#21 0x00007ff72b969402 `anonymous
namespace'::ItaniumCXXABI::EmitCXXConstructors
D:\src\llvm-project-11\clang\lib\CodeGen\ItaniumCXXABI.cpp:1601:0
#22 0x00007ff72c5dd0df `anonymous
namespace'::CodeGeneratorImpl::HandleTopLevelDecl
D:\src\llvm-project-11\clang\lib\CodeGen\ModuleBuilder.cpp:169:0
#23 0x00007ff72b39cb69 clang::BackendConsumer::HandleTopLevelDecl(class
clang::DeclGroupRef)
D:\src\llvm-project-11\clang\lib\CodeGen\CodeGenAction.cpp:216:0
#24 0x00007ff72c4c1bf5 clang::ParseAST(class clang::Sema &, bool, bool)
D:\src\llvm-project-11\clang\lib\Parse\ParseAST.cpp:162:0
#25 0x00007ff72b303672 clang::FrontendAction::Execute(void)
D:\src\llvm-project-11\clang\lib\Frontend\FrontendAction.cpp:954:0
#26 0x00007ff72a95f90c clang::CompilerInstance::ExecuteAction(class
clang::FrontendAction &)
D:\src\llvm-project-11\clang\lib\Frontend\CompilerInstance.cpp:984:0
#27 0x00007ff72a9bee2f clang::ExecuteCompilerInvocation(class
clang::CompilerInstance *)
D:\src\llvm-project-11\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:278:0
#28 0x00007ff72a3e7078 cc1_main(class llvm::ArrayRef<char const *>, char const
*, void *) D:\src\llvm-project-11\clang\tools\driver\cc1_main.cpp:240:0
#29 0x00007ff72a3e4654 ExecuteCC1Tool
D:\src\llvm-project-11\clang\tools\driver\driver.cpp:330:0
#30 0x00007ff72a3e442b main
D:\src\llvm-project-11\clang\tools\driver\driver.cpp:407:0

-- 
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/20200715/b72d3eb2/attachment-0001.html>


More information about the llvm-bugs mailing list