[LLVMbugs] [Bug 12510] New: static analyzer crashes with "Comparison requires equal bit widths" assertion failure

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 9 17:16:56 PDT 2012


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

             Bug #: 12510
           Summary: static analyzer crashes with "Comparison requires
                    equal bit widths" assertion failure
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8361
  --> http://llvm.org/bugs/attachment.cgi?id=8361
repro

See attached files (contains .i, command line, etc). From the stderr file:


Assertion failed: (BitWidth == RHS.BitWidth && "Comparison requires equal bit
widths"), function operator==, file
/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/include/llvm/ADT/APInt.h,
line 858.
0  clang++           0x00000001014996f2 PrintStackTrace(void*) + 34
1  clang++           0x0000000101499b79 SignalHandler(int) + 697
2  libSystem.B.dylib 0x00007fff895ab1ba _sigtramp + 26
3  libSystem.B.dylib 0x0000000101f0ee50 _sigtramp + 2023111856
4  clang++           0x00000001000475d6 abort + 22
5  clang++           0x0000000100047595 __assert_rtn + 53
6  clang++           0x000000010065c82d
clang::ento::BasicValueFactory::evalAPSInt(clang::BinaryOperatorKind,
llvm::APSInt const&, llvm::APSInt const&) + 1053
7  clang++           0x00000001006c94f0
clang::ento::nonloc::ConcreteInt::evalBinOp(clang::ento::SValBuilder&,
clang::BinaryOperatorKind, clang::ento::nonloc::ConcreteInt const&) const + 32
8  clang++           0x00000001006cc622 (anonymous
namespace)::SimpleSValBuilder::evalBinOpNN(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::BinaryOperatorKind, clang::ento::NonLoc, clang::ento::NonLoc,
clang::QualType) + 2642
9  clang++           0x00000001006c87cd
clang::ento::SValBuilder::evalBinOp(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::BinaryOperatorKind, clang::ento::SVal, clang::ento::SVal,
clang::QualType) + 717
10 clang++           0x0000000100690807
clang::ento::ExprEngine::VisitBinaryOperator(clang::BinaryOperator const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 1863
11 clang++           0x0000000100685ad4
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 4020
12 clang++           0x000000010068436f
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 3103
13 clang++           0x000000010068360a
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
122
14 clang++           0x000000010067b514
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 148
15 clang++           0x000000010067af9e
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 542
16 clang++           0x000000010067ab7b
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 747
17 clang++           0x00000001005c2f50 (anonymous
namespace)::AnalysisConsumer::ActionExprEngine(clang::Decl*, bool,
llvm::SmallPtrSet<clang::Decl const*, 24u>*) + 960
18 clang++           0x00000001005c2911 (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, (anonymous
namespace)::AnalysisConsumer::AnalysisMode, llvm::SmallPtrSet<clang::Decl
const*, 24u>*) + 2177
19 clang++           0x00000001005bf56a (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) + 2010
20 clang++           0x00000001002a88e6 clang::ParseAST(clang::Sema&, bool) +
390
21 clang++           0x000000010006ad45
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 949
22 clang++           0x00000001000532c0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3216
23 clang++           0x000000010004ad26 cc1_main(char const**, char const**,
char const*, void*) + 2806

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