aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeaux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r--src/vdbeaux.c11
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