[LLVMbugs] [Bug 10823] New: Failed assertion: `DefinitionData && "queried property of class with no definition"'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 1 01:43:51 PDT 2011


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

           Summary: Failed assertion: `DefinitionData && "queried property
                    of class with no definition"'
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pipping at exherbo.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=7186)
 --> (http://llvm.org/bugs/attachment.cgi?id=7186)
delta-reduced input (not valid code but manages to make clang++ crash)

Reduced from libc++/src/locale.cpp

% clang++ -c locale-ThMXu8.ii
locale-ThMXu8.ii:1:51: error: expected class name
template <class foo> struct __num_get : protected __num_get_base {
                                                  ^
locale-ThMXu8.ii:2:10: error: unknown type name 'string'
  static string   __stage2_int_prep(ios_base& __iob);
         ^
locale-ThMXu8.ii:2:37: error: unknown type name 'ios_base'
  static string   __stage2_int_prep(ios_base& __iob);
                                    ^
locale-ThMXu8.ii:6:16: error: no template named 'num_get'; did you mean
'__num_get'?
template class num_get<wchar_t>;
               ^~~~~~~
               __num_get
locale-ThMXu8.ii:1:29: note: '__num_get' declared here
template <class foo> struct __num_get : protected __num_get_base {
                            ^
clang:
/var/tmp/paludis/build/dev-lang-llvm-scm/work/llvm-scm/tools/clang/lib/Sema/../../include/clang/AST/DeclCXX.h:530:
const clang::CXXRecordDecl::DefinitionData& clang::CXXRecordDecl::data() const:
Assertion `DefinitionData && "queried property of class with no definition"'
failed.
0  libLLVM-3.0svn.so 0x00007f82f313802f
1  libLLVM-3.0svn.so 0x00007f82f3138790
2  libpthread.so.0   0x00007f82f2115f10
3  libc.so.6         0x00007f82f14345c5 gsignal + 53
4  libc.so.6         0x00007f82f14358c5 abort + 389
5  libc.so.6         0x00007f82f142d235 __assert_fail + 245
6  clang             0x0000000000927e5f
clang::Sema::MarkVTableUsed(clang::SourceLocation, clang::CXXRecordDecl*, bool)
+ 79
7  clang             0x0000000000a96be7
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 185
8  clang             0x0000000000a29f39
clang::Sema::ActOnExplicitInstantiation(clang::Scope*, clang::SourceLocation,
clang::SourceLocation, unsigned int, clang::SourceLocation, clang::CXXScopeSpec
const&, clang::OpaquePtr<clang::TemplateName>, clang::SourceLocation,
clang::SourceLocation, clang::ASTTemplateArgsPtr, clang::SourceLocation,
clang::AttributeList*) + 2085
9  clang             0x0000000000827d83
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 3337
10 clang             0x000000000081587a
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 5760
11 clang             0x00000000007ea511
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 885
12 clang             0x00000000007eef3b
clang::Parser::ParseExplicitInstantiation(clang::SourceLocation,
clang::SourceLocation, clang::SourceLocation&) + 91
13 clang             0x00000000007ef25e
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 766
14 clang             0x000000000081646f
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 191
15 clang             0x00000000007fdda7
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1675
16 clang             0x00000000007fe847
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 241
17 clang             0x00000000007d1210 clang::ParseAST(clang::Sema&, bool) +
308
18 clang             0x0000000000593c64
clang::ASTFrontendAction::ExecuteAction() + 200
19 clang             0x00000000006884c9 clang::CodeGenAction::ExecuteAction() +
2691
20 clang             0x0000000000594203 clang::FrontendAction::Execute() + 389
21 clang             0x0000000000581410
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 868
22 clang             0x00000000005680cd
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3805
23 clang             0x000000000055eeee cc1_main(char const**, char const**,
char const*, void*) + 7074
24 clang             0x0000000000565078 main + 751
25 libc.so.6         0x00007f82f1420c7d __libc_start_main + 253
26 clang             0x000000000055d179
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -main-file-name locale-ThMXu8.ii
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.1
-momit-leaf-frame-pointer -coverage-file locale-ThMXu8.o -resource-dir
/usr/bin/../lib/clang/3.0 -fdeprecated-macro -ferror-limit 19 -fmessage-length
118 -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-o locale-ThMXu8.o -x c++-cpp-output locale-ThMXu8.ii 
1.      locale-ThMXu8.ii:6:32: current parser token ';'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
%

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list