[LLVMbugs] [Bug 9160] New: clang segmentation fault with -Wshadow

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 7 06:15:17 PST 2011


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

           Summary: clang segmentation fault with -Wshadow
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: felix.ritter at mevis.fraunhofer.de
                CC: llvmbugs at cs.uiuc.edu


clang version 2.9 (trunk 125005)
Target: x86_64-apple-darwin10
Thread model: posix

clang segfaults when the shadow warning is activated (-Wshadow), it does not
crash without this warning:

0  clang             0x0000000101524032 PrintStackTrace(void*) + 34
1  clang             0x0000000101524e83 SignalHandler(int) + 707
2  libSystem.B.dylib 0x00007fff847b767a _sigtramp + 26
3  libSystem.B.dylib 0x00000000002c5db0 _sigtramp + 2075191120
4  clang             0x00000001003d1047
clang::Sema::ActOnVariableDeclarator(clang::Scope*, clang::Declarator&,
clang::DeclContext*, clang::QualType, clang::TypeSourceInfo*,
clang::LookupResult&, clang::ASTMultiPtr<clang::TemplateParameterList*>, bool&)
+ 2887
5  clang             0x00000001003d7fc4
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&,
clang::ASTMultiPtr<clang::TemplateParameterList*>, bool) + 1492
6  clang             0x00000001002e8b21
clang::Parser::ParseDeclarationAfterDeclarator(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 1649
7  clang             0x00000001002ec129
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*) + 761
8  clang             0x00000001002f5235
clang::Parser::ParseSimpleDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, bool) +
853
9  clang             0x00000001002f5339
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 105
10 clang             0x00000001003250b6
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 1910
11 clang             0x000000010032534e
clang::Parser::ParseCompoundStatementBody(bool) + 446
12 clang             0x0000000100324df6
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 1206
13 clang             0x000000010032812c
clang::Parser::ParseIfStatement(clang::ParsedAttributes&) + 876
14 clang             0x0000000100324e3c
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 1276
15 clang             0x000000010032534e
clang::Parser::ParseCompoundStatementBody(bool) + 446
16 clang             0x000000010032611a
clang::Parser::ParseCXXTryBlockCommon(clang::SourceLocation) + 154
17 clang             0x0000000100324cf3
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 947
18 clang             0x000000010032534e
clang::Parser::ParseCompoundStatementBody(bool) + 446
19 clang             0x0000000100325817
clang::Parser::ParseFunctionStatementBody(clang::Decl*) + 135
20 clang             0x0000000100339f08
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 696
21 clang             0x00000001002ec556
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*) + 1830
22 clang             0x0000000100337515
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 165
23 clang             0x0000000100337957
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 407
24 clang             0x0000000100338c23
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2787
25 clang             0x00000001002fb97f clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1887
26 clang             0x00000001002f5624
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 852
27 clang             0x0000000100338b43
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2563
28 clang             0x0000000100338e73
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 115
29 clang             0x00000001002e2c2f clang::ParseAST(clang::Sema&, bool) +
159
30 clang             0x00000001002b36cc clang::CodeGenAction::ExecuteAction() +
60
31 clang             0x0000000100053a99
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 393
32 clang             0x00000001000249c2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1602
33 clang             0x000000010001c63a cc1_main(char const**, char const**,
char const*, void*) + 586
34 clang             0x00000001000239f4 main + 5588
35 clang             0x000000010001af34 start + 52
Stack dump:
0.    Program arguments: /Users/ritter/Temp/llvm/Release+Asserts/bin/clang -cc1
-triple x86_64-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free
-main-file-name ML_mlSubImageBoxd.ii -pic-level 1 -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 97.17
-resource-dir /Users/ritter/Temp/llvm/Release+Asserts/bin/../lib/clang/2.9
-Wshadow -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -fblocks
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
ML_mlSubImageBoxd.o -x c++-cpp-output ML_mlSubImageBoxd.ii 
1.    source/mlSubImageBoxd.cpp:65:19: current parser token '('
2.    source/mlSubImageBoxd.cpp:16:1: parsing namespace 'ml'
3.    source/mlSubImageBoxd.cpp:46:3: parsing function body
'calcAATransformedBox'
4.    source/mlSubImageBoxd.cpp:46:3: in compound statement ('{}')
5.    source/mlSubImageBoxd.cpp:49:5: in compound statement ('{}')
6.    source/mlSubImageBoxd.cpp:53:11: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal 1 (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