/ Check-in [23b62fb1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:OSSFuzz found a case where an assert() inside sqlite3ExprCompare() can be true. Test case added to TH3.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:23b62fb160d86dc9d9073bcc714601f5b7695f96abd893eafecf4b2e565b87f2
User & Date: drh 2018-12-12 11:23:40
Context
2018-12-12
20:11
Remove an ALWAYS() from a branch that is not always taken. The test case found by OSSFuzz has been added to TH3. check-in: 5c7dab85 user: drh tags: trunk
11:57
OSSFuzz found a case where an assert() inside sqlite3ExprCompare() can be true. Test case added to TH3. check-in: bc891ac6 user: drh tags: branch-3.26
11:23
OSSFuzz found a case where an assert() inside sqlite3ExprCompare() can be true. Test case added to TH3. check-in: 23b62fb1 user: drh tags: trunk
2018-12-11
12:51
Small performance improvement in sqlite3_step(). check-in: d1db8d58 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

  4780   4780     if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2;
  4781   4781     if( ALWAYS((combinedFlags & EP_TokenOnly)==0) ){
  4782   4782       if( combinedFlags & EP_xIsSelect ) return 2;
  4783   4783       if( (combinedFlags & EP_FixedCol)==0
  4784   4784        && sqlite3ExprCompare(pParse, pA->pLeft, pB->pLeft, iTab) ) return 2;
  4785   4785       if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;
  4786   4786       if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
  4787         -    assert( (combinedFlags & EP_Reduced)==0 );
  4788         -    if( pA->op!=TK_STRING && pA->op!=TK_TRUEFALSE ){
         4787  +    if( pA->op!=TK_STRING
         4788  +     && pA->op!=TK_TRUEFALSE
         4789  +     && (combinedFlags & EP_Reduced)==0
         4790  +    ){
  4789   4791         if( pA->iColumn!=pB->iColumn ) return 2;
  4790   4792         if( pA->iTable!=pB->iTable 
  4791   4793          && (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
  4792   4794       }
  4793   4795     }
  4794   4796     return 0;
  4795   4797   }