mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-02 05:54:29 +03:00
Fix a problem with SQLITE_TEST_REALLOC_STRESS.
FossilOrigin-Name: 0aaf3febb00f622c5ef0853b2491d69f7ca7a21e
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user