/ Check-in [96d3e99f]
Login

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

Overview
Comment:Fix a memory allocation bug introduced last week by check-in [a9e819082ba]. The bug only appears on systems where the size of a structure is not always a multiple of 8 - which in practice means only on 32-bit windows systems.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 96d3e99ffe59b5280b8b7fc269c94a72e15c345b
User & Date: drh 2015-12-11 04:11:17
Context
2015-12-11
12:44
Add the experimental snapshot interface. Because it is experimental, it is subject to change or removal at a later date. check-in: 9b124a5a user: drh tags: trunk
04:11
Fix a memory allocation bug introduced last week by check-in [a9e819082ba]. The bug only appears on systems where the size of a structure is not always a multiple of 8 - which in practice means only on 32-bit windows systems. check-in: 96d3e99f user: drh tags: trunk
2015-12-10
17:59
Move pointer range comparisons into a macro, where they can be dealt with in a more portable way. check-in: 05bc4f92 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

  1855   1855   
  1856   1856     resolveP2Values(p, &nArg);
  1857   1857     p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);
  1858   1858     if( pParse->explain && nMem<10 ){
  1859   1859       nMem = 10;
  1860   1860     }
  1861   1861     memset(zCsr, 0, nFree);
         1862  +  nFree -= (zCsr - (u8*)0)&7;
  1862   1863     zCsr += (zCsr - (u8*)0)&7;
  1863   1864     assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
  1864   1865     p->expired = 0;
  1865   1866   
  1866   1867     /* Memory for registers, parameters, cursor, etc, is allocated in two
  1867   1868     ** passes.  On the first pass, we try to reuse unused space at the 
  1868   1869     ** end of the opcode array.  If we are unable to satisfy all memory