-C Fix\sa\sproblem\swith\sthe\ssqlite3VdbeMayAbort()\sassert\sfailing\sfollowing\san\sOOM.
-D 2009-09-10T16:14:51
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+C Add\sassert()\sstatement\sto\sverify\sthat\snew\smutexes\sare\snot\sallocated\swhen\nthe\smutex\ssubsystem\sis\suninitialized.
+D 2009-09-10T17:45:00
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 73ddeec9dd10b85876c5c2ce1fdce627e1dcc7f8
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/mem3.c 67153ec933e08b70714055e872efb58a6b287939
F src/mem5.c 4837b795ebdecc0cfe1522cd0c8b2c5d84ea490d
F src/memjournal.c e68cb5f7e828b84d5bf2ea16c5d87f1ed7e9fe7f
-F src/mutex.c 73899d158560117c02909b6e9ffe2bad2560a817
+F src/mutex.c 60cd6d854e1c5dbedd9928815c00d63ec24283a9
F src/mutex.h 9e686e83a88838dac8b9c51271c651e833060f1e
F src/mutex_noop.c f5a07671f25a1a9bd7c10ad7107bc2585446200f
F src/mutex_os2.c 6b5a74f812082a8483c3df05b47bbaac2424b9a0
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P f2a9ee722c568e73f2a08fb6a2886719850f2923
-R 0b14469668328c64842d4f0eb53973f8
-U dan
-Z db4c68226e60cda5c9b94fd0b4485956
+P b3027863505fa8edf355f3f5eea4502ef365175e
+R 08804fe3d59d9c44cb7b080e511dfef2
+U drh
+Z 0e4a69ed44dd7c7502a8c79038532167
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFKqTsgoxKgR168RlERAn1TAJ9uG3gx/c3HhgDhOPqRUn7M66SIOwCggh6Q
+/YiheptxazPExELwQLXw9SU=
+=OssI
+-----END PGP SIGNATURE-----
*/
#include "sqliteInt.h"
+#ifdef SQLITE_DEBUG
+/*
+** For debugging purposes, record when the mutex subsystem is initialized
+** and uninitialized so that we can assert() if there is an attempt to
+** allocate a mutex while the system is uninitialized.
+*/
+static SQLITE_WSD int mutexIsInit = 0;
+#endif /* SQLITE_DEBUG */
+
+
#ifndef SQLITE_MUTEX_OMIT
/*
** Initialize the mutex system.
rc = sqlite3GlobalConfig.mutex.xMutexInit();
}
+#ifdef SQLITE_DEBUG
+ GLOBAL(int, mutexIsInit) = 1;
+#endif
+
return rc;
}
if( sqlite3GlobalConfig.mutex.xMutexEnd ){
rc = sqlite3GlobalConfig.mutex.xMutexEnd();
}
+
+#ifdef SQLITE_DEBUG
+ GLOBAL(int, mutexIsInit) = 0;
+#endif
+
return rc;
}
if( !sqlite3GlobalConfig.bCoreMutex ){
return 0;
}
+ assert( GLOBAL(int, mutexIsInit) );
return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
}