]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
When sqlite3VdbeAddOp() fails due to an OOM fault, return an address of 1
authordrh <drh@noemail.net>
Fri, 26 Jun 2009 14:04:51 +0000 (14:04 +0000)
committerdrh <drh@noemail.net>
Fri, 26 Jun 2009 14:04:51 +0000 (14:04 +0000)
rather than zero so that there appears to always be a prior instruction.
This prevents a negative jump-to address computation in where.c following
an OOM fault. (CVS 6822)

FossilOrigin-Name: fe02339cb2f61c1e8a356e2d0ce9c3aef6e6cd8d

manifest
manifest.uuid
src/vdbeaux.c

index 8e3c39db82e23ab7bbb6a172a2f63b9c245cd3b7..a85e50464c0a9265852ce0c01300a02b2b5e3182 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\stest\sscript\sproblem\sin\sexclusive.test.\s(CVS\s6821)
-D 2009-06-26T12:30:40
+C When\ssqlite3VdbeAddOp()\sfails\sdue\sto\san\sOOM\sfault,\sreturn\san\saddress\sof\s1\nrather\sthan\szero\sso\sthat\sthere\sappears\sto\salways\sbe\sa\sprior\sinstruction.\nThis\sprevents\sa\snegative\sjump-to\saddress\scomputation\sin\swhere.c\sfollowing\nan\sOOM\sfault.\s(CVS\s6822)
+D 2009-06-26T14:04:51
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -207,7 +207,7 @@ F src/vdbe.c e7831536ddb11b14ce29f62a17e0e3860944d570
 F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
 F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
 F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
-F src/vdbeaux.c 569653e18a29904e603542d1e5f8ea6a49ddc2f4
+F src/vdbeaux.c 338d4b4323d9153d918d890e72b02f796ba20663
 F src/vdbeblob.c c25d7e7bc6d5917feeb17270bd275fa771f26e5c
 F src/vdbemem.c 1618f685d19b4bcc96e40b3c478487bafd2ae246
 F src/vtab.c 98fbffc5efe68d8107511dec0a650efc7daa9446
@@ -737,7 +737,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P ac1450285025e33fad81e2fb14a06eb85e8ed87a
-R 93a1400e20189084799dc0214a9ceb18
-U danielk1977
-Z 7744482958494d5303ddabc5400940aa
+P a52ef5a4216f26c617bd1471cd19f3da2a6d2c4c
+R 7c553912f88d2576d87919ca301ee243
+U drh
+Z 54e939e48b5dd1bf7f258c6a78252ee4
index 6cebb8891a88b1cc1ba09ca66f8ba2ec4d8c3bc0..f50a38465235b8af459fff14fa63e5076029a77f 100644 (file)
@@ -1 +1 @@
-a52ef5a4216f26c617bd1471cd19f3da2a6d2c4c
\ No newline at end of file
+fe02339cb2f61c1e8a356e2d0ce9c3aef6e6cd8d
\ No newline at end of file
index 989e0c5f943891939b628e4376351df3b296601e..b3924c5490ac6b616b4699c81c8e4264d6ab8405 100644 (file)
@@ -14,7 +14,7 @@
 ** to version 2.8.7, all this code was combined into the vdbe.c source file.
 ** But that file was getting too big so this subroutines were split out.
 **
-** $Id: vdbeaux.c,v 1.465 2009/06/26 12:15:23 drh Exp $
+** $Id: vdbeaux.c,v 1.466 2009/06/26 14:04:51 drh Exp $
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
@@ -145,7 +145,7 @@ int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
   assert( op>0 && op<0xff );
   if( p->nOpAlloc<=i ){
     if( growOpArray(p) ){
-      return 0;
+      return 1;
     }
   }
   p->nOp++;