[llvm-bugs] [Bug 47169] New: loader_uninitialized used on a class-template causes a crash and assert

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 14 07:00:45 PDT 2020


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

            Bug ID: 47169
           Summary: loader_uninitialized used on a class-template causes a
                    crash and assert
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: erich.keane at intel.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

template<typename T> struct Foo{};
Foo<int> Global __attribute__((loader_uninitialized));

Invocation is simply clang -cc1 filename.cpp.



clang: /iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:434:
clang::CXXRecordDecl::DefinitionData& clang::CXXRecordDecl::data() const:
Assertion `DD && "queried property of class with no definition"' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff67471f7 in raise () from /lib64/libc.so.6
(gdb) (gdb) bt
#0  0x00007ffff67471f7 in raise () from /lib64/libc.so.6
#1  0x00007ffff67488e8 in abort () from /lib64/libc.so.6
#2  0x00007ffff6740266 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff6740312 in __assert_fail () from /lib64/libc.so.6
#4  0x0000000004fb53c8 in clang::CXXRecordDecl::data (this=0x115292a8) at
/iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:434
#5  0x0000000005040d2e in clang::CXXRecordDecl::hasDefaultConstructor
(this=0x115292a8) at
/iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:738
#6  0x0000000005040eca in clang::CXXRecordDecl::hasTrivialDefaultConstructor
(this=0x115292a8) at
/iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:1175
#7  0x0000000007c96a03 in clang::Sema::ActOnUninitializedDecl (this=0x115190e0,
RealDecl=0x11529468) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Sema/SemaDecl.cpp:12476
#8  0x00000000079c8078 in
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes (this=0x115236d0,
D=..., TemplateInfo=..., FRI=0x0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/ParseDecl.cpp:2332
#9  0x00000000079c679e in clang::Parser::ParseDeclGroup (this=0x115236d0,
DS=..., Context=clang::DeclaratorContext::FileContext, DeclEnd=0x0, FRI=0x0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/ParseDecl.cpp:1986
#10 0x00000000079a911e in clang::Parser::ParseDeclOrFunctionDefInternal
(this=0x115236d0, attrs=..., DS=..., AS=clang::AS_none) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:1099
#11 0x00000000079a91d8 in clang::Parser::ParseDeclarationOrFunctionDefinition
(this=0x115236d0, attrs=..., DS=0x0, AS=clang::AS_none) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:1115
#12 0x00000000079a86ba in clang::Parser::ParseExternalDeclaration
(this=0x115236d0, attrs=..., DS=0x0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:935
#13 0x00000000079a77e9 in clang::Parser::ParseTopLevelDecl (this=0x115236d0,
Result=..., IsFirstDecl=false) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:683
#14 0x00000000079a321f in clang::ParseAST (S=..., PrintStats=false,
SkipFunctionBodies=false) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/ParseAST.cpp:158
#15 0x000000000582b7fb in clang::ASTFrontendAction::ExecuteAction
(this=0x114ca1d0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Frontend/FrontendAction.cpp:1057
#16 0x000000000582b163 in clang::FrontendAction::Execute (this=0x114ca1d0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Frontend/FrontendAction.cpp:950
#17 0x00000000057c5d68 in clang::CompilerInstance::ExecuteAction
(this=0x114c6e50, Act=...) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Frontend/CompilerInstance.cpp:984
#18 0x00000000059a5336 in clang::ExecuteCompilerInvocation (Clang=0x114c6e50)
at
/iusers/ekeane1/workspaces/sycl/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278
#19 0x000000000224e26d in cc1_main (Argv=llvm::ArrayRef of length 2 = {...},
Argv0=0x7fffffffb55d "/export/iusers/ekeane1/workspaces/sycl/build/bin/clang",
MainAddr=0x22429d2 <GetExecutablePath[abi:cxx11](char const*, bool)>) at
/iusers/ekeane1/workspaces/sycl/clang/tools/driver/cc1_main.cpp:240
#20 0x0000000002244087 in ExecuteCC1Tool (ArgV=llvm::SmallVector of Size 3,
Capacity 256 = {...}) at
/iusers/ekeane1/workspaces/sycl/clang/tools/driver/driver.cpp:330
#21 0x0000000002244788 in main (argc_=3, argv_=0x7fffffffaad8) at
/iusers/ekeane1/workspaces/sycl/clang/tools/driver/driver.cpp:407

-- 
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/20200814/95d53ef8/attachment.html>


More information about the llvm-bugs mailing list