SQLite
Check-in [96d3e99f]
Not logged in
Overview
SHA1:96d3e99ffe59b5280b8b7fc269c94a72e15c345b
Date: 2015-12-11 04:11:17
User: drh
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.
Tags And Properties
Context
2015-12-11
12:44
[9b124a5a] Add the experimental snapshot interface. Because it is experimental, it is subject to change or removal at a later date. (user: drh, tags: trunk)
04:11
[96d3e99f] 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. (user: drh, tags: trunk)
2015-12-10
17:59
[05bc4f92] Move pointer range comparisons into a macro, where they can be dealt with in a more portable way. (user: drh, tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

1855
1856
1857
1858
1859
1860
1861

1862
1863
1864
1865
1866
1867
1868

  resolveP2Values(p, &nArg);
  p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);
  if( pParse->explain && nMem<10 ){
    nMem = 10;
  }
  memset(zCsr, 0, nFree);

  zCsr += (zCsr - (u8*)0)&7;
  assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
  p->expired = 0;

  /* Memory for registers, parameters, cursor, etc, is allocated in two
  ** passes.  On the first pass, we try to reuse unused space at the 
  ** end of the opcode array.  If we are unable to satisfy all memory







>







1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869

  resolveP2Values(p, &nArg);
  p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);
  if( pParse->explain && nMem<10 ){
    nMem = 10;
  }
  memset(zCsr, 0, nFree);
  nFree -= (zCsr - (u8*)0)&7;
  zCsr += (zCsr - (u8*)0)&7;
  assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
  p->expired = 0;

  /* Memory for registers, parameters, cursor, etc, is allocated in two
  ** passes.  On the first pass, we try to reuse unused space at the 
  ** end of the opcode array.  If we are unable to satisfy all memory