From adad77a6c608fd8b29a7b5b2ff75331c303e9ea8 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 17 Aug 2009 16:01:11 +0000 Subject: [PATCH] Always call sqlite3_malloc() in sqlite3OsInit(), even when not compiled with SQLITE_TEST. FossilOrigin-Name: b98a8706a61ad27c881b6820eee10d06bfb27417 --- manifest | 24 +++++++++++++++++------- manifest.uuid | 2 +- src/os.c | 4 +++- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index d286d7b9d0..22001b39dc 100644 --- a/manifest +++ b/manifest @@ -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----- diff --git a/manifest.uuid b/manifest.uuid index eb7ae681b9..9b8888fbc7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -67ad21abf88abb7a3e2eacddcaf1ab5d54149807 \ No newline at end of file +b98a8706a61ad27c881b6820eee10d06bfb27417 \ No newline at end of file diff --git a/src/os.c b/src/os.c index 4adf123967..7f080ecd42 100644 --- a/src/os.c +++ b/src/os.c @@ -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(); }