diff options
author | mistachkin <mistachkin@noemail.net> | 2015-04-16 03:24:38 +0000 |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2015-04-16 03:24:38 +0000 |
commit | fb383e9229461dd883852418b6489c091cdce3cd (patch) | |
tree | e4ff7f3e1f80bbdaf23ead55a502796f58881aaa /src/wal.c | |
parent | 00eb70d89c427a6d0e86788346c8ddd6f93d6ec5 (diff) | |
parent | 22ecef5c20e007ae5121d9febb3bb3d7f56097b0 (diff) | |
download | sqlite-fb383e9229461dd883852418b6489c091cdce3cd.tar.gz sqlite-fb383e9229461dd883852418b6489c091cdce3cd.zip |
Merge updates from trunk. Make OSTRACE changes work on Linux.
FossilOrigin-Name: cd1542664eb3eb46d486664ded49cd9c4bef3948
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 ); |