aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2020-01-29 13:10:50 +0000
committerdrh <drh@noemail.net>2020-01-29 13:10:50 +0000
commitffd3fd0c30d7b096adb54ccd8b0c8b907c86e803 (patch)
tree536de97bf2b54d5c8221bc316438e1a2bf810de0 /src/main.c
parent9ca9a53a421920a412d4fdfd57303593c1ecf723 (diff)
downloadsqlite-ffd3fd0c30d7b096adb54ccd8b0c8b907c86e803.tar.gz
sqlite-ffd3fd0c30d7b096adb54ccd8b0c8b907c86e803.zip
Add new memory barriers during initialization.
FossilOrigin-Name: a9b2adc5d61790abd86839d12e7ecb98a85d7e4cde5f94558530e32449d9e483
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 3983f083b..60052437d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -161,7 +161,10 @@ 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.