/ Check-in [7fdd378d]
Login

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

Overview
Comment:Fix a segfault that can occur following an OOM error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7fdd378d54754a3ffdc01c6c0a66cf6d5899a495
User & Date: dan 2014-03-03 14:20:30
Context
2014-03-03
16:48
Change the "explain_i" tcl test command so that xterm color codes are only added if the output is actually a terminal. check-in: 559835e5 user: dan tags: trunk
14:45
Merge latest trunk changes. check-in: e00ed717 user: dan tags: experimental
14:20
Fix a segfault that can occur following an OOM error. check-in: 7fdd378d user: dan tags: trunk
00:12
Change the MEM_Dyn flag so that it means that Mem.xDel exists and must be used to free the string or blob. Add tighter invariant checks on Mem. check-in: e3f6c61e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  5866   5866       assert( pTab!=0 );
  5867   5867       pLoop = pLevel->pWLoop;
  5868   5868   
  5869   5869       /* For a co-routine, change all OP_Column references to the table of
  5870   5870       ** the co-routine into OP_SCopy of result contained in a register.
  5871   5871       ** OP_Rowid becomes OP_Null.
  5872   5872       */
  5873         -    if( pTabItem->viaCoroutine ){
         5873  +    if( pTabItem->viaCoroutine && !db->mallocFailed ){
  5874   5874         last = sqlite3VdbeCurrentAddr(v);
  5875   5875         k = pLevel->addrBody;
  5876   5876         pOp = sqlite3VdbeGetOp(v, k);
  5877   5877         for(; k<last; k++, pOp++){
  5878   5878           if( pOp->p1!=pLevel->iTabCur ) continue;
  5879   5879           if( pOp->opcode==OP_Column ){
  5880   5880             pOp->opcode = OP_SCopy;