]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Make sure memory malloced() for structures is aligned on an even byte boundry.
authordrh <drh@noemail.net>
Sat, 21 Sep 2002 15:57:57 +0000 (15:57 +0000)
committerdrh <drh@noemail.net>
Sat, 21 Sep 2002 15:57:57 +0000 (15:57 +0000)
Solaris segfaults otherwise. (CVS 753)

FossilOrigin-Name: 14ebe30bf5937effdc388e23e998ba1a34fb0a29

manifest
manifest.uuid
src/build.c

index 4c15ef729933ca7abc466f845a749596717829b7..3eb3daabc4bc59cc167683dcb769d3e425cfa315 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sbug\sin\sthe\sOP_MemStore\soperator\sof\sthe\sVDBE.\s\sA\srealloc()\smight\noccur\sbut\spointer\sto\sthe\sold\sbuffer\swere\snot\sbeing\smoved\sover\sto\nthe\snew\sbuffer.\s(CVS\s752)
-D 2002-09-17T03:20:46
+C Make\ssure\smemory\smalloced()\sfor\sstructures\sis\saligned\son\san\seven\sbyte\sboundry.\nSolaris\ssegfaults\sotherwise.\s(CVS\s753)
+D 2002-09-21T15:57:57
 F Makefile.in d6c9a85c2a5e696843201d090dcf8bf2f8716f2a
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -20,7 +20,7 @@ F spec.template 238f7db425a78dc1bb7682e56e3834c7270a3f5e
 F sqlite.1 83f4a9d37bdf2b7ef079a82d54eaf2e3509ee6ea
 F src/btree.c 8024b87635c2adf133f153f1bb595125ec1c7d7b
 F src/btree.h 0ca6c2631338df62e4f7894252d9347ae234eda9
-F src/build.c d41b8da6b52ff84b235a785b226c37f3090ed276
+F src/build.c 84f397a61b5bfcc1140fd41b9f8c5bda364dfea5
 F src/delete.c aad9d4051ab46e6f6391ea5f7b8994a7c05bdd15
 F src/encode.c 6c9c87d5b7b2c0101d011ebc283a80abf672a4d1
 F src/expr.c e1327eb020a68ff7c49382e121ad4b71b3441b2a
@@ -149,7 +149,7 @@ F www/speed.tcl a20a792738475b68756ea7a19321600f23d1d803
 F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P f12c3a25ba5408c2a7c846a9f160416fd188cd26
-R 3c4e79bd5ec6ce7d63d34d010c5a09db
+P 29145746f34438bd830c763872c5e82572150357
+R 5d4b302464bafa2bfba8710f952a6108
 U drh
-Z c5560c2e0285ec66000e64e43f75e92e
+Z dc6c63618e264b41d89885961d5df42f
index 5659d2a7dda25579f72ba2b981dec2b458c5356d..5e9bb5fd45b2f37118004129f0aed5c1b323c0ed 100644 (file)
@@ -1 +1 @@
-29145746f34438bd830c763872c5e82572150357
\ No newline at end of file
+14ebe30bf5937effdc388e23e998ba1a34fb0a29
\ No newline at end of file
index 39ddd8b6b24cd1f12c8ebd402802753f6af57f63..0a0d761194a7cb7477e41e8b4b1d4b244dcaec90 100644 (file)
@@ -25,7 +25,7 @@
 **     ROLLBACK
 **     PRAGMA
 **
-** $Id: build.c,v 1.112 2002/09/14 13:47:32 drh Exp $
+** $Id: build.c,v 1.113 2002/09/21 15:57:57 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -1245,14 +1245,15 @@ void sqliteCreateForeignKey(
   if( pFKey==0 ) goto fk_end;
   pFKey->pFrom = p;
   pFKey->pNextFrom = p->pFKey;
-  pFKey->zTo = z = (char*)&pFKey[1];
+  z = (char*)&pFKey[1];
+  pFKey->aCol = (struct sColMap*)z;
+  z += sizeof(struct sColMap)*nCol;
+  pFKey->zTo = z;
   memcpy(z, pTo->z, pTo->n);
   z[pTo->n] = 0;
   z += pTo->n+1;
   pFKey->pNextTo = 0;
   pFKey->nCol = nCol;
-  pFKey->aCol = (struct sColMap*)z;
-  z += sizeof(struct sColMap)*nCol;
   if( pFromCol==0 ){
     pFKey->aCol[0].iFrom = p->nCol-1;
   }else{