/ Check-in [1a88e31b]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Correct an assert() in mem2.c (test code only).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a88e31b03e090732243a70bec082b32ecf77c43
User & Date: dan 2010-03-08 15:17:53
Context
2010-03-08
21:40
Add NEVER and assert macros and explanatory comments for unreachable conditions. check-in: ffb6596e user: drh tags: trunk
15:17
Correct an assert() in mem2.c (test code only). check-in: 1a88e31b user: dan tags: trunk
10:32
Do not run the stmt.test script as part of the inmemory_journal permutation. check-in: 049cadf9 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mem2.c.

   296    296   /*
   297    297   ** Free memory.
   298    298   */
   299    299   static void sqlite3MemFree(void *pPrior){
   300    300     struct MemBlockHdr *pHdr;
   301    301     void **pBt;
   302    302     char *z;
   303         -  assert( sqlite3GlobalConfig.bMemstat || mem.mutex!=0 );
          303  +  assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0 
          304  +       || mem.mutex!=0 );
   304    305     pHdr = sqlite3MemsysGetHeader(pPrior);
   305    306     pBt = (void**)pHdr;
   306    307     pBt -= pHdr->nBacktraceSlots;
   307    308     sqlite3_mutex_enter(mem.mutex);
   308    309     if( pHdr->pPrev ){
   309    310       assert( pHdr->pPrev->pNext==pHdr );
   310    311       pHdr->pPrev->pNext = pHdr->pNext;