/ Check-in [0d5747db]
Login

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

Overview
Comment:Change to the crash simulator to give better diagnostics in case it runs out of memory while using the mem3.c allocator. (CVS 4632)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0d5747dbad97bf09cf9050e44efbcf5d6b812fbd
User & Date: drh 2007-12-14 17:22:23
Context
2007-12-14
17:24
Fix a C++-ism in recent changes to select.c. (CVS 4633) check-in: 4a008050 user: drh tags: trunk
17:22
Change to the crash simulator to give better diagnostics in case it runs out of memory while using the mem3.c allocator. (CVS 4632) check-in: 0d5747db user: drh tags: trunk
16:11
Fix a typo in the previous check-in. Also simplify a line in select.c. (CVS 4631) check-in: 86f45d7b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test6.c.

   335    335     int nBuf
   336    336   ){
   337    337     WriteBuffer *pNew;
   338    338   
   339    339     assert((zBuf && nBuf) || (!nBuf && !zBuf));
   340    340   
   341    341     pNew = (WriteBuffer *)sqlite3MallocZero(sizeof(WriteBuffer) + nBuf);
          342  +  if( pNew==0 ){
          343  +    fprintf(stderr, "out of memory in the crash simulator\n");
          344  +  }
   342    345     pNew->iOffset = iOffset;
   343    346     pNew->nBuf = nBuf;
   344    347     pNew->pFile = (CrashFile *)pFile;
   345    348     if( zBuf ){
   346    349       pNew->zBuf = (u8 *)&pNew[1];
   347    350       memcpy(pNew->zBuf, zBuf, nBuf);
   348    351     }