diff options
author | drh <drh@noemail.net> | 2018-10-02 20:16:41 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-10-02 20:16:41 +0000 |
commit | 9b7e8e10f2049456068868fe4881b26990ffeaf6 (patch) | |
tree | b82dc78102cadea17dceb1f59221b931e5decf87 /src/os_unix.c | |
parent | 8820c8d3eea5e9305064657f5be4ed96fa122014 (diff) | |
download | sqlite-9b7e8e10f2049456068868fe4881b26990ffeaf6.tar.gz sqlite-9b7e8e10f2049456068868fe4881b26990ffeaf6.zip |
Add an additional assert() verifying mutex invariants on the
unixShmSystemLock() routine in the unix VFS.
FossilOrigin-Name: cb1511065d5348c5b3015dc9d690fc5d519a14ffdfa7164bb552a4fa686ad142
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 1b18e874e..55f220ea9 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4288,6 +4288,7 @@ static int unixShmSystemLock( /* Access to the unixShmNode object is serialized by the caller */ pShmNode = pFile->pInode->pShmNode; assert( pShmNode->nRef==0 || sqlite3_mutex_held(pShmNode->pShmMutex) ); + assert( pShmNode->nRef>0 || unixMutexHeld() ); /* Shared locks never span more than one byte */ assert( n==1 || lockType!=F_RDLCK ); |