[LLVMbugs] [Bug 10129] New: clang crashes with -Wlarge-by-value-copy

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jun 12 23:24:48 PDT 2011


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

           Summary: clang crashes with -Wlarge-by-value-copy
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6733)
 --> (http://llvm.org/bugs/attachment.cgi?id=6733)
repro

1. unzip tmp.ii.zip
2. thakis$ ~/src/llvm-rw/Release+Asserts/bin/clang -Wlarge-by-value-copy tmp.ii

Crashes:
Assertion failed: (0 && "Unknown builtin type!"), function getTypeInfo, file
ASTContext.cpp, line 798.0  clang             0x0000000101759c02
PrintStackTrace(void*) + 341  clang             0x000000010175aa53
SignalHandler(int) + 7072  libSystem.B.dylib 0x00007fff812f266a _sigtramp + 263
 libSystem.B.dylib 0x00007fff5fbfb12e _sigtramp + 37340146864  clang           
 0x000000010001a832 __assert_rtn + 665  clang             0x0000000100898aed
clang::ASTContext::getTypeInfo(clang::Type const*) const + 13896  clang        
    0x0000000100899385 clang::ASTContext::getTypeInfo(clang::Type const*) const
+ 3589
7  clang             0x000000010089b092
clang::ASTContext::getTypeSizeInChars(clang::QualType) const + 50
8  clang             0x000000010041a116
clang::Sema::DiagnoseSizeOfParametersAndReturnValue(clang::ParmVarDecl* const*,
clang::ParmVarDecl* const*, clang::QualType, clang::NamedDecl*) + 166
9  clang             0x000000010041fded
clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 237
10 clang             0x0000000100364d78
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 248
11 clang             0x0000000100313136
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 262
12 clang             0x0000000100312c68
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 104
13 clang             0x000000010033632c
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 988
14 clang             0x0000000100337f83
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4755
15 clang             0x0000000100323309
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 3689
16 clang             0x000000010036e486
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 710
17 clang             0x000000010036f419
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 761
18 clang             0x000000010036f841
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 417
19 clang             0x000000010032bbe8
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 760
20 clang             0x000000010037d93f
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1327
21 clang             0x000000010037e39d
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 173
22 clang             0x000000010031248b clang::ParseAST(clang::Sema&, bool) +
299
23 clang             0x00000001002de23c clang::CodeGenAction::ExecuteAction() +
60
24 clang             0x00000001000593f1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 433
25 clang             0x0000000100024f95
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1493
26 clang             0x000000010001bb51 cc1_main(char const**, char const**,
char const*, void*) + 577
27 clang             0x0000000100023dee main + 4526
28 clang             0x000000010001af84 start + 52
29 clang             0x0000000000000028 start + 4294856920
Stack dump:
0.    Program arguments: /Users/thakis/src/llvm-rw/Release+Asserts/bin/clang
-cc1 -triple x86_64-apple-macosx10.6.7 -emit-obj -mrelax-all -disable-free
-main-file-name tmp.ii -pic-level 1 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 97.17 -resource-dir
/Users/thakis/src/llvm-rw/Release+Asserts/bin/../lib/clang/3.0
-fdeprecated-macro -Wlarge-by-value-copy 64 -ferror-limit 19 -fmessage-length
188 -fobjc-infer-related-result-type -stack-protector 1 -fblocks
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/++/++1Gyk++6+0++4RjPqRgNE++ojg/-Tmp-/cc-fGB3vb.o -x c++-cpp-output
tmp.ii 
1.    ../base/observer_list.h:187:2: current parser token ';'
2.    ../base/observer_list.h:65:1: parsing struct/union/class body
'ObserverListBase'
3.    ../base/observer_list.h:116:39: parsing function body
'ObserverListBase<ObserverType>'
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)

-- 
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