aboutsummaryrefslogtreecommitdiff
path: root/src/wal.c
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2015-04-16 03:24:38 +0000
committermistachkin <mistachkin@noemail.net>2015-04-16 03:24:38 +0000
commitfb383e9229461dd883852418b6489c091cdce3cd (patch)
treee4ff7f3e1f80bbdaf23ead55a502796f58881aaa /src/wal.c
parent00eb70d89c427a6d0e86788346c8ddd6f93d6ec5 (diff)
parent22ecef5c20e007ae5121d9febb3bb3d7f56097b0 (diff)
downloadsqlite-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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wal.c b/src/wal.c
index 558adbcad..df3c8cb94 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -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 );