mirror of
https://github.com/sqlite/sqlite.git
synced 2024-12-01 17:23:42 +01:00
Avoid a segfault when OOM on a simple EXPLAIN query. Ticket #3478. (CVS 5860)
FossilOrigin-Name: acf26cc0f77b3a308d86f6dc02ecda66a4b12fd0
This commit is contained in:
parent
4413d0e976
commit
c46f52034f
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sthe\ssqlite3_db_mutex()\sinterface.\s\sNo\stest\scases\syet.\s(CVS\s5859)
|
||||
D 2008-11-04T13:46:28
|
||||
C Avoid\sa\ssegfault\swhen\sOOM\son\sa\ssimple\sEXPLAIN\squery.\s\sTicket\s#3478.\s(CVS\s5860)
|
||||
D 2008-11-04T14:25:06
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in da817da72422f9b876602c225fcd17d6ca4182f7
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -194,7 +194,7 @@ F src/vdbe.c d2c9b71d0a996d87508ec841583ae50d23c9a3db
|
||||
F src/vdbe.h 03516f28bf5aca00a53c4dccd6c313f96adb94f6
|
||||
F src/vdbeInt.h 1fd87002786828b75046dcfbc942cf97036b8433
|
||||
F src/vdbeapi.c 6798c70cf176d23594ec557db88190ca8c7fa860
|
||||
F src/vdbeaux.c 68ec5b5d6aaf48d24121a2ed6c23124dd001c735
|
||||
F src/vdbeaux.c 3c6ebfba16fdc58d868bfc5a2f95fae9417130a6
|
||||
F src/vdbeblob.c b0dcebfafedcf9c0addc7901ad98f6f986c08935
|
||||
F src/vdbefifo.c 20fda2a7c4c0bcee1b90eb7e545fefcdbf2e1de7
|
||||
F src/vdbemem.c c0e9d9947db8968762c7621369f821bb181c1c86
|
||||
@ -428,7 +428,7 @@ F test/mallocF.test 2d5c590ebc2fc7f0dcebdf5aa8498b9aed69107e
|
||||
F test/mallocG.test 4584d0d8ddb8009f16ca0c8bab1fa37f6358efa2
|
||||
F test/mallocH.test 79b65aed612c9b3ed2dcdaa727c85895fd1bfbdb
|
||||
F test/mallocI.test 6e24fe6444bd2999ccc81f984977b44c0d6e5591
|
||||
F test/mallocJ.test 5e7798d543cd837d6fd1c1d8086fe1867e705723
|
||||
F test/mallocJ.test 110204e20eb8a9475d6df57d07d09c31d4542b07
|
||||
F test/malloc_common.tcl 984baeb6c6b185e798827d1187d426acc2bc4962
|
||||
F test/manydb.test 8de36b8d33aab5ef295b11d9e95310aeded31af8
|
||||
F test/memdb.test a67bda4ff90a38f2b19f6c7f95aa7289e051d893
|
||||
@ -654,7 +654,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P cedfa214e4e979ab04a30f558f767d46862151de
|
||||
R 455fe7ce922ef8b355f1e416fa2f04b2
|
||||
P d95de32e8ded397adeef8f7a29b87bc85669ac95
|
||||
R 311b672b2aa5220681c6b634ffa28a60
|
||||
U drh
|
||||
Z e3ee957bbe72b22fd564e398dd239acd
|
||||
Z 3b3f6a00601535b79e178ee5461e8314
|
||||
|
@ -1 +1 @@
|
||||
d95de32e8ded397adeef8f7a29b87bc85669ac95
|
||||
acf26cc0f77b3a308d86f6dc02ecda66a4b12fd0
|
@ -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.415 2008/11/03 20:55:07 drh Exp $
|
||||
** $Id: vdbeaux.c,v 1.416 2008/11/04 14:25:06 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@ -1038,7 +1038,7 @@ void sqlite3VdbeMakeReady(
|
||||
/*resizeOpArray(p, p->nOp);*/
|
||||
assert( nVar>=0 );
|
||||
if( isExplain && nMem<10 ){
|
||||
p->nMem = nMem = 10;
|
||||
nMem = 10;
|
||||
}
|
||||
p->aMem = sqlite3DbMallocZero(db,
|
||||
nMem*sizeof(Mem) /* aMem */
|
||||
|
@ -12,7 +12,7 @@
|
||||
# This test script checks malloc failures in LIMIT operations for
|
||||
# UPDATE/DELETE statements.
|
||||
#
|
||||
# $Id: mallocJ.test,v 1.2 2008/10/30 22:13:23 drh Exp $
|
||||
# $Id: mallocJ.test,v 1.3 2008/11/04 14:25:06 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -49,4 +49,9 @@ do_malloc_test mallocJ-2 -sqlprep {
|
||||
ORDER BY 2, 3;
|
||||
}
|
||||
|
||||
# ticket #3478
|
||||
do_malloc_test mallocJ-3 -sqlbody {
|
||||
EXPLAIN COMMIT
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
Loading…
Reference in New Issue
Block a user