/ Check-in [fe02339c]
Login

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

Overview
Comment:When sqlite3VdbeAddOp() fails due to an OOM fault, return an address of 1 rather than zero so that there appears to always be a prior instruction. This prevents a negative jump-to address computation in where.c following an OOM fault. (CVS 6822)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:fe02339cb2f61c1e8a356e2d0ce9c3aef6e6cd8d
User & Date: drh 2009-06-26 14:04:51
Context
2009-06-26
14:17
Skip a couple tests requiring working 64bit int support on platforms without that support. Test code change only. (CVS 6823) check-in: d8c8145c user: shane tags: trunk
14:04
When sqlite3VdbeAddOp() fails due to an OOM fault, return an address of 1 rather than zero so that there appears to always be a prior instruction. This prevents a negative jump-to address computation in where.c following an OOM fault. (CVS 6822) check-in: fe02339c user: drh tags: trunk
12:30
Fix a test script problem in exclusive.test. (CVS 6821) check-in: a52ef5a4 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
**
*************************************************************************
** This file contains code used for creating, destroying, and populating
** a VDBE (or an "sqlite3_stmt" as it is known to the outside world.)  Prior
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
** $Id: vdbeaux.c,v 1.465 2009/06/26 12:15:23 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"



/*
................................................................................
  VdbeOp *pOp;

  i = p->nOp;
  assert( p->magic==VDBE_MAGIC_INIT );
  assert( op>0 && op<0xff );
  if( p->nOpAlloc<=i ){
    if( growOpArray(p) ){
      return 0;
    }
  }
  p->nOp++;
  pOp = &p->aOp[i];
  pOp->opcode = (u8)op;
  pOp->p5 = 0;
  pOp->p1 = p1;







|







 







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
**
*************************************************************************
** This file contains code used for creating, destroying, and populating
** a VDBE (or an "sqlite3_stmt" as it is known to the outside world.)  Prior
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
** $Id: vdbeaux.c,v 1.466 2009/06/26 14:04:51 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"



/*
................................................................................
  VdbeOp *pOp;

  i = p->nOp;
  assert( p->magic==VDBE_MAGIC_INIT );
  assert( op>0 && op<0xff );
  if( p->nOpAlloc<=i ){
    if( growOpArray(p) ){
      return 1;
    }
  }
  p->nOp++;
  pOp = &p->aOp[i];
  pOp->opcode = (u8)op;
  pOp->p5 = 0;
  pOp->p1 = p1;