diff options
author | drh <drh@noemail.net> | 2016-01-18 00:20:26 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-01-18 00:20:26 +0000 |
commit | dad300d8e1a9e9db9b9be19929e22d6a3c2bcdda (patch) | |
tree | 2820e3c9e3d07ce7425e65ff28d95c5524526e8e /src/vdbeaux.c | |
parent | 3ed7029921c201a6dc9a0861497b782d392ac47c (diff) | |
download | sqlite-dad300d8e1a9e9db9b9be19929e22d6a3c2bcdda.tar.gz sqlite-dad300d8e1a9e9db9b9be19929e22d6a3c2bcdda.zip |
Fix a problem with SQLITE_TEST_REALLOC_STRESS.
FossilOrigin-Name: 0aaf3febb00f622c5ef0853b2491d69f7ca7a21e
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 9859054ba..492a41599 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -607,11 +607,14 @@ int sqlite3VdbeCurrentAddr(Vdbe *p){ /* ** Verify that at least N opcode slots are available in p without -** having to malloc for more space. This interface is used for -** testing only. +** having to malloc for more space (except when compiled using +** SQLITE_TEST_REALLOC_STRESS). This interface is used during testing +** to verify that certain calls to sqlite3VdbeAddOpList() can never +** fail due to a OOM fault and hence that the return value from +** sqlite3VdbeAddOpList() will always be non-NULL. */ -#ifdef SQLITE_DEBUG -void sqlite3VdbeVerifyAvailableSpace(Vdbe *p, int N){ +#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS) +void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N){ assert( p->nOp + N <= p->pParse->nOpAlloc ); } #endif |