-C Run\sa\stest\swith\sTEST_REALLOC_STRESS\sand\sOMIT_LOOKASIDE\sdefined\sas\spart\sof\sreleasetest.tcl\son\sLinux/x86-64.
-D 2014-08-12T14:06:13.039
+C Improve\sthe\scomments\sassociated\swith\sSQLITE_TEST_REALLOC_STRESS\sand\sadd\nan\sextra\sassert()\sto\sprove\san\sassumption.
+D 2014-08-12T14:29:20.012
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5eb79e334a5de69c87740edd56af6527dd219308
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/vdbe.h c63fad052c9e7388d551e556e119c0bcf6bebdf8
F src/vdbeInt.h f5513f2b5ac1e2c5128996c7ea23add256a301df
F src/vdbeapi.c 24e40422382beb774daab11fe9fe9d37e8a04949
-F src/vdbeaux.c d83ca171e5df5fdea95e61b6e935d78c02b9d982
+F src/vdbeaux.c 25d62ef82cf1be2a1255eacac636fa0d943d8b3d
F src/vdbeblob.c 9205ce9d3b064d9600f8418a897fc88b5687d9ac
F src/vdbemem.c d90a1e8acf8b63dc9d14cbbea12bfec6cec31394
F src/vdbesort.c f7f5563bf7d4695ca8f3203f3bf9de96d04ed0b3
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 4c291827224b84487a38e7ccba2edabc0f15b5ba
-R 1284079e980f8822b336e39d17ba6126
-U dan
-Z b89cd6a3a53bd57f0d4f91bd2d9a8d6b
+P a1baf3a7b177728cdfcd6d9345a0d6bf0a8887c0
+R f180a595651acb4f056167092db3a8a0
+U drh
+Z 0f6249f5f46f843c4c724ed2717337d8
-a1baf3a7b177728cdfcd6d9345a0d6bf0a8887c0
\ No newline at end of file
+35c454616321d480ecbc4efdf6869bbcdf0d3aa2
\ No newline at end of file
/*
** Resize the Vdbe.aOp array so that it is at least nOp elements larger
-** its current size. nOp is guaranteed to be less than or equal to 1024.
+** than its current size. nOp is guaranteed to be less than or equal
+** to 1024/sizeof(Op).
**
** If an out-of-memory error occurs while resizing the array, return
** SQLITE_NOMEM. In this case Vdbe.aOp and Parse.nOpAlloc remain
VdbeOp *pNew;
Parse *p = v->pParse;
- /* If SQLITE_TEST_REALLOC_STRESS is defined and the current op array is
- ** less than 512 entries in size, grow the op array by the minimum amount
- ** required. Otherwise, allocate either double the current size of the
- ** array or 1KB of space, whichever is smaller. */
+ /* The SQLITE_TEST_REALLOC_STRESS compile-time option is designed to force
+ ** more frequent reallocs and hence provide more opportunities for
+ ** simulated OOM faults. SQLITE_TEST_REALLOC_STRESS is generally used
+ ** during testing only. With SQLITE_TEST_REALLOC_STRESS grow the op array
+ ** by the minimum* amount required until the size reaches 512. Normal
+ ** operation (without SQLITE_TEST_REALLOC_STRESS) is to double the current
+ ** size of the op array or add 1KB of space, whichever is smaller. */
#ifdef SQLITE_TEST_REALLOC_STRESS
int nNew = (p->nOpAlloc>=512 ? p->nOpAlloc*2 : p->nOpAlloc+nOp);
#else
UNUSED_PARAMETER(nOp);
#endif
+ assert( nOp<=(1024/sizeof(Op)) );
assert( nNew>=(p->nOpAlloc+nOp) );
pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op));
if( pNew ){