1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Avoid misaligned memory allocations on Sparc in sqlite3VdbeMakeReady().

FossilOrigin-Name: a304e34675404aee860fcc97fa4ffcc57c014812
This commit is contained in:
drh
2016-01-01 16:26:22 +00:00
parent a660caf2f0
commit 3c19bb60d1
3 changed files with 9 additions and 10 deletions

View File

@@ -1849,9 +1849,8 @@ void sqlite3VdbeMakeReady(
/* Allocate space for memory registers, SQL variables, VDBE cursors and
** an array to marshal SQL function arguments in.
*/
zCsr = (u8*)&p->aOp[p->nOp]; /* Memory avaliable for allocation */
assert( pParse->nOpAlloc*sizeof(Op) <= 0x7fffff00 );
nFree = (pParse->nOpAlloc - p->nOp)*sizeof(p->aOp[0]); /* Available space */
zCsr = ((u8*)p->aOp) + ROUND8(sizeof(Op)*p->nOp); /* Available space */
nFree = sqlite3_msize(p->aOp) - ROUND8(sizeof(Op)*p->nOp); /* Size of zCsr */
resolveP2Values(p, &nArg);
p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);