Always call sqlite3_malloc() in sqlite3OsInit(), even when not compiled

with SQLITE_TEST.

FossilOrigin-Name: b98a8706a61ad27c881b6820eee10d06bfb27417
This commit is contained in:
drh 2009-08-17 16:01:11 +00:00
parent 3d6e060b48
commit adad77a6c6
3 changed files with 21 additions and 9 deletions

View File

@ -1,5 +1,8 @@
C Move\serror\ssimulation\scode\sfrom\sthe\ssqlite3_os_init()\sfunctions\sinto\sa\swrapper.
D 2009-08-17T15:52:26
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C Always\scall\ssqlite3_malloc()\sin\ssqlite3OsInit(),\seven\swhen\snot\scompiled\nwith\sSQLITE_TEST.
D 2009-08-17T16:01:11
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 0f7761c5d1c62ae7a841e3393ffaff1fa0f5c00a
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -141,7 +144,7 @@ F src/mutex_os2.c 6b5a74f812082a8483c3df05b47bbaac2424b9a0
F src/mutex_unix.c aff26c77f698b552becfedfa677ad1036c42d790
F src/mutex_w32.c b2c1481ee93b0ac7a8fa5346570fd173b6763fdb
F src/notify.c 0127121816d8a861deb0dfd111b495346bf233db
F src/os.c 3855c23ceb2006795b29c78915ebf36717b06aad
F src/os.c 9fea283e336ee31caa4654d6cb05a129a1c42d2f
F src/os.h 00a1334a4eecee7f7bef79ac606b88d325119f21
F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
@ -746,7 +749,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
P 32509bc7339cd6a46cea4c243e3418546860cb2d
R ee9f9682e4e218a87239394324f62b18
U dan
Z 435403f17ee49c9f5cf99c3836460b04
P 67ad21abf88abb7a3e2eacddcaf1ab5d54149807
R ec549832cb633402033ac649502759b2
U drh
Z be48c323c8b8282b760b014b1ad810ca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFKiX7KoxKgR168RlERAm/TAJ9kojYfPGoCSQZ1ggED1UZNojnliQCeMPZF
46q/U09ODtw1dhYAA6r5GcY=
=35NL
-----END PGP SIGNATURE-----

View File

@ -1 +1 @@
67ad21abf88abb7a3e2eacddcaf1ab5d54149807
b98a8706a61ad27c881b6820eee10d06bfb27417

View File

@ -197,7 +197,9 @@ int sqlite3OsCloseFree(sqlite3_file *pFile){
** error in sqlite3_os_init() by the upper layers can be tested.
*/
int sqlite3OsInit(void){
DO_OS_MALLOC_TEST(0);
void *p = sqlite3_malloc(10);
if( p==0 ) return SQLITE_NOMEM;
sqlite3_free(p);
return sqlite3_os_init();
}