[LLVMbugs] [Bug 10824] New: Segmentation Fault

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 1 01:45:49 PDT 2011


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

           Summary: Segmentation Fault
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pipping at exherbo.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


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

Reduced from libc++/src/locale.cpp

% clang++ -std=c++0x locale-ThMXu8.ii
locale-ThMXu8.ii:1:9: error: address expression must be an lvalue or a function
designator
typedef union {
        ^~~~~
0  libLLVM-3.0svn.so 0x00007f0425d2602f
1  libLLVM-3.0svn.so 0x00007f0425d26790
2  libpthread.so.0   0x00007f0424d03f10
3  clang             0x0000000000e52430
clang::Expr::hasAnyTypeDependentArguments(clang::Expr**, unsigned int) + 38
4  clang             0x000000000098030a
clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation,
clang::ASTMultiPtr<clang::Expr*>, clang::SourceLocation, clang::Expr*) + 566
5  clang             0x000000000091a953
clang::Sema::DefineImplicitMoveAssignment(clang::SourceLocation,
clang::CXXMethodDecl*) + 6369
6  clang             0x000000000095bc77
clang::Sema::MarkDeclarationReferenced(clang::SourceLocation, clang::Decl*) +
869
7  clang             0x00000000009ff199
clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, unsigned int,
clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) + 1581
8  clang             0x000000000097cab6 clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) +
274
9  clang             0x000000000097d52a clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) +
2456
10 clang             0x000000000082f9a5
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 2533
11 clang             0x000000000082fb75
clang::Parser::ParseAssignmentExpression() + 335
12 clang             0x0000000000830919 clang::Parser::ParseExpression() + 9
13 clang             0x00000000007e92f2
clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 74
14 clang             0x00000000007e522a
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 2816

15 clang             0x00000000007e2845
clang::Parser::ParseCompoundStatementBody(bool) + 2395
16 clang             0x00000000007e2f07
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 217
17 clang             0x0000000000805256
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 3608
18 clang             0x00000000008058de
clang::Parser::LexedMethod::ParseLexedMethodDefs() + 16
19 clang             0x00000000008043e9
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 185
20 clang             0x0000000000826f78
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 3750
21 clang             0x00000000008286e0
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 5734
22 clang             0x000000000081587a
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 5760
23 clang             0x00000000007fbb8f
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 93
24 clang             0x00000000007fc282
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 696
25 clang             0x00000000007fe27d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2913
26 clang             0x00000000007fe847
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 241
27 clang             0x00000000007d1210 clang::ParseAST(clang::Sema&, bool) +
308
28 clang             0x0000000000593c64
clang::ASTFrontendAction::ExecuteAction() + 200
29 clang             0x00000000006884c9 clang::CodeGenAction::ExecuteAction() +
2691
30 clang             0x0000000000594203 clang::FrontendAction::Execute() + 389
31 clang             0x0000000000581410
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 868
32 clang             0x00000000005680cd
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3805
33 clang             0x000000000055eeee cc1_main(char const**, char const**,
char const*, void*) + 7074
34 clang             0x0000000000565078 main + 751
35 libc.so.6         0x00007f042400ec7d __libc_start_main + 253
36 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 -resource-dir /usr/bin/../lib/clang/3.0 -std=c++0x
-fdeprecated-macro -ferror-limit 19 -fmessage-length 118 -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/locale-ThMXu8-q8Yp1g.o -x c++-cpp-output locale-ThMXu8.ii 
1.      locale-ThMXu8.ii:11:38: current parser token ';'
2.      locale-ThMXu8.ii:7:1: parsing struct/union/class body 'mutex'
3.      locale-ThMXu8.ii:10:11: parsing function body 'mutex'
4.      locale-ThMXu8.ii:10:11: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
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