/ Check-in [bc891ac6]
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 | branch-3.26
Files: files | file ages | folders
SHA3-256: bc891ac6b62fe7d9a5c157a95d0b9dc2559f7abb84d7b22e258acb9b250c224f
User & Date: drh 2018-12-12 11:57:35
Context
2019-01-22
18:20
Add the SQLITE_ENABLE_EARLY_CURSOR_CLOSE compile-time option which causes read cursors to be closed after their usefulness ends during a two-pass UPDATE. Leaf check-in: 8790368b user: mistachkin tags: branch-3.26
2018-12-12
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:54
Fix a problem with using "<db>-vacuum" (the default) as the state database when resuming an RBU vacuum. check-in: 6b7567fc 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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

  4788   4788     if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2;
  4789   4789     if( ALWAYS((combinedFlags & EP_TokenOnly)==0) ){
  4790   4790       if( combinedFlags & EP_xIsSelect ) return 2;
  4791   4791       if( (combinedFlags & EP_FixedCol)==0
  4792   4792        && sqlite3ExprCompare(pParse, pA->pLeft, pB->pLeft, iTab) ) return 2;
  4793   4793       if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;
  4794   4794       if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
  4795         -    assert( (combinedFlags & EP_Reduced)==0 );
  4796         -    if( pA->op!=TK_STRING && pA->op!=TK_TRUEFALSE ){
         4795  +    if( pA->op!=TK_STRING
         4796  +     && pA->op!=TK_TRUEFALSE
         4797  +     && (combinedFlags & EP_Reduced)==0
         4798  +    ){
  4797   4799         if( pA->iColumn!=pB->iColumn ) return 2;
  4798   4800         if( pA->iTable!=pB->iTable 
  4799   4801          && (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
  4800   4802       }
  4801   4803     }
  4802   4804     return 0;
  4803   4805   }