Created
January 29, 2020 01:28
-
-
Save vinterstum/ff4bc1ea715cc1d4c5da45864c9de4af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sqlite/src/sqlite3.c b/sqlite/src/sqlite3.c | |
--- a/sqlite/src/sqlite3.c | |
+++ b/sqlite/src/sqlite3.c | |
@@ -25165,6 +25165,7 @@ SQLITE_PRIVATE int sqlite3MutexInit(void | |
GLOBAL(int, mutexIsInit) = 1; | |
#endif | |
+ sqlite3MemoryBarrier(); | |
return rc; | |
} | |
@@ -155363,7 +155364,10 @@ SQLITE_API int sqlite3_initialize(void){ | |
** must be complete. So isInit must not be set until the very end | |
** of this routine. | |
*/ | |
- if( sqlite3GlobalConfig.isInit ) return SQLITE_OK; | |
+ if( sqlite3GlobalConfig.isInit ) { | |
+ sqlite3MemoryBarrier(); | |
+ return SQLITE_OK; | |
+ } | |
/* Make sure the mutex subsystem is initialized. If unable to | |
** initialize the mutex subsystem, return early with the error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment