[LLVMbugs] [Bug 7527] New: Assertion failed: (BinaryOperator::isComparisonOp(op) || op == BinaryOperator::Sub), function EvalBinOpLL

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 29 18:01:04 PDT 2010


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

           Summary: Assertion failed: (BinaryOperator::isComparisonOp(op)
                    || op == BinaryOperator::Sub), function EvalBinOpLL
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: kremenek at apple.com
                CC: llvmbugs at cs.uiuc.edu


The following delta-reduced example from sqlite3 causes the analyzer to assert:


$ cat reduced.c 
typedef struct Mem sqlite3_value;
typedef unsigned short int u16;
typedef unsigned char u8;
struct Mem {
  char *z;
  u16 flags;
};
static const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
  if( pVal->flags&0x0002 ){
    if( (enc & 8)!=0 && 1==(1&((int)(pVal->z))) ){
    }
  }
}

$ clang --analyze reduced.c
Assertion failed: (BinaryOperator::isComparisonOp(op) || op ==
BinaryOperator::Sub), function EvalBinOpLL, file
/Users/buildslave/zorg/buildbot/smooshlab/slave/build.clang-x86_64-darwin10-miniswb/clang.src/src/tools/clang/lib/Checker/SimpleSValuator.cpp,
line 505.

This is a recent regression.

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