diff options
author | drh <drh@noemail.net> | 2015-04-15 14:14:38 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-04-15 14:14:38 +0000 |
commit | ff363ee1217d79e8988a16ef0d72e5ee1729dc48 (patch) | |
tree | ad4bf050eb315f2742224500d564bb8918458bf5 /src/wal.c | |
parent | df3c171881b4ee77003b9d7e287220c22dbc97a2 (diff) | |
parent | 0d01ec8de83b4e0d7523d67c5f92a44f0ba79b8e (diff) | |
download | sqlite-ff363ee1217d79e8988a16ef0d72e5ee1729dc48.tar.gz sqlite-ff363ee1217d79e8988a16ef0d72e5ee1729dc48.zip |
Merge all recent trunk fixes and enhancements into the sessions branch.
FossilOrigin-Name: e65e65f9bc9b4bf5c9dd6e3a77a0d5f03c40e006
Diffstat (limited to 'src/wal.c')
-rw-r--r-- | src/wal.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1730,6 +1730,14 @@ static int walCheckpoint( mxSafeFrame = pWal->hdr.mxFrame; mxPage = pWal->hdr.nPage; for(i=1; i<WAL_NREADER; i++){ + /* Thread-sanitizer reports that the following is an unsafe read, + ** as some other thread may be in the process of updating the value + ** of the aReadMark[] slot. The assumption here is that if that is + ** happening, the other client may only be increasing the value, + ** not decreasing it. So assuming either that either the "old" or + ** "new" version of the value is read, and not some arbitrary value + ** that would never be written by a real client, things are still + ** safe. */ u32 y = pInfo->aReadMark[i]; if( mxSafeFrame>y ){ assert( y<=pWal->hdr.mxFrame ); |