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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to