1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Add an additional assert() verifying mutex invariants on the

unixShmSystemLock() routine in the unix VFS.

FossilOrigin-Name: cb1511065d5348c5b3015dc9d690fc5d519a14ffdfa7164bb552a4fa686ad142
This commit is contained in:
drh
2018-10-02 20:16:41 +00:00
parent 8820c8d3ee
commit 9b7e8e10f2
3 changed files with 8 additions and 7 deletions

View File

@@ -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 );