[LLVMbugs] [Bug 10615] New: SIGFPE (div by 0) in clang::Sema::CheckArrayAccess

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 9 02:29:23 PDT 2011


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

           Summary: SIGFPE (div by 0) in clang::Sema::CheckArrayAccess
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: quickslyver at free.fr
                CC: llvmbugs at cs.uiuc.edu


clang -cc1 clang-bug.c
Stack dump:
0.    Program arguments: temp/llvm-vanilla/llvm-build/bin/clang -cc1
clang-bug.c 
1.    clang-bug.c:9:42: current parser token ';'
2.    clang-bug.c:8:1: parsing function body 'ext2_statfs'
3.    clang-bug.c:8:1: in compound statement ('{}')
Floatting point exception


GDB stack dump:

#0  0xb7e81a6a in __udivdi3 () from /lib/libgcc_s.so.1
#1  0x08fef8bd in clang::Sema::CheckArrayAccess(clang::Expr const*, clang::Expr
const*, bool, bool) ()
#2  0x090de9cf in
clang::Sema::CheckAdditionOperands(clang::ActionResult<clang::Expr*, true>&,
clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation,
clang::QualType*) ()
#3  0x090e6d82 in clang::Sema::CreateBuiltinBinOp(clang::SourceLocation,
clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) ()
#4  0x090e8656 in clang::Sema::BuildBinOp(clang::Scope*, clang::SourceLocation,
clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) ()
#5  0x090e8437 in clang::Sema::ActOnBinOp(clang::Scope*, clang::SourceLocation,
clang::tok::TokenKind, clang::Expr*, clang::Expr*) ()
#6  0x08d245fe in
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) ()
#7  0x08d23b18 in clang::Parser::ParseAssignmentExpression() ()
#8  0x08d23840 in clang::Parser::ParseExpression() ()
#9  0x08ced9f5 in clang::Parser::ParseReturnStatement(clang::ParsedAttributes&)
()
#10 0x08ce8e2a in
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) ()
#11 0x08ceadbc in clang::Parser::ParseCompoundStatementBody(bool) ()
#12 0x08ceec3c in clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) ()
#13 0x08cfea6a in
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) ()
#14 0x08d09c0e in
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) ()
#15 0x08cfe072 in
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) ()
#16 0x08cfe0e7 in
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) ()
#17 0x08cfd939 in
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) ()
#18 0x08cfcee5 in
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) ()
#19 0x08cda399 in clang::ParseAST(clang::Sema&, bool) ()
#20 0x08c4620f in clang::ASTFrontendAction::ExecuteAction() ()
#21 0x08c45e6e in clang::FrontendAction::Execute() ()
#22 0x08c2b6c9 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#23 0x08c98755 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#24 0x08bac653 in cc1_main(char const**, char const**, char const*, void*) ()
#25 0x08ba74e0 in main ()

With Linux 32bit (Debian Stable)

Are you able to reproduce this crash with others platforms ?

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