Fix another msan complain triggered by a corrupt database.
FossilOrigin-Name: d235d406283191fc7b9e1299be602f1e8be6f36cee8b183cf85c8660519a1c3b
This commit is contained in:
parent
1e06c70eb0
commit
1f9f576695
15
manifest
15
manifest
@ -1,5 +1,5 @@
|
|||||||
C Initialize\sextra\sfield\sin\sPgHdr1\sto\sfix\san\smsan\scomplaint.
|
C Fix\sanother\smsan\scomplain\striggered\sby\sa\scorrupt\sdatabase.
|
||||||
D 2021-02-28T08:24:56.477
|
D 2021-03-01T16:15:41.526
|
||||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||||
@ -483,7 +483,7 @@ F src/auth.c 08954fdc4cc2da5264ba5b75cfd90b67a6fc7d1710a02ccf917c38eadec77853
|
|||||||
F src/backup.c 3014889fa06e20e6adfa0d07b60097eec1f6e5b06671625f476a714d2356513d
|
F src/backup.c 3014889fa06e20e6adfa0d07b60097eec1f6e5b06671625f476a714d2356513d
|
||||||
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
||||||
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||||
F src/btree.c 694020ad8a3af3d79b09f74c8f1421272a419cdea42a13401e3b0f7dea6e9c3e
|
F src/btree.c bafa3a2e8b6622a3aa8791f90c8ecc70e8ae551ba9023f865213890f5b8a8994
|
||||||
F src/btree.h 285f8377aa1353185a32bf455faafa9ff9a0d40d074d60509534d14990c7829e
|
F src/btree.h 285f8377aa1353185a32bf455faafa9ff9a0d40d074d60509534d14990c7829e
|
||||||
F src/btreeInt.h 7614cae30f95b6aed0c7cac7718276a55cfe2c77058cbfd8bef5b75329757331
|
F src/btreeInt.h 7614cae30f95b6aed0c7cac7718276a55cfe2c77058cbfd8bef5b75329757331
|
||||||
F src/build.c e1790f21cd19708af231ceed5e52f495b94c4b2609e27d2b5ce2805a9aa3464e
|
F src/build.c e1790f21cd19708af231ceed5e52f495b94c4b2609e27d2b5ce2805a9aa3464e
|
||||||
@ -1908,10 +1908,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P a631c38d22bc00d38b0f112a623fb24c0e03a962f661ffe0931dad32fd31ba31
|
P 4cb2ea5795b0c0678665fd89bd560209beaab8a756fe00335dbfd07493b0542d
|
||||||
R 121b1b49c8dd85bf7799053762dcf3af
|
R 77dd21d5cda99cecce763a4b3e142b99
|
||||||
T *branch * msan-fix
|
|
||||||
T *sym-msan-fix *
|
|
||||||
T -sym-trunk *
|
|
||||||
U dan
|
U dan
|
||||||
Z f5ed21d50100afccf53ab3ca05e5bd48
|
Z 6cd7a73f945651c0ccd62f6c92141ec4
|
||||||
|
@ -1 +1 @@
|
|||||||
4cb2ea5795b0c0678665fd89bd560209beaab8a756fe00335dbfd07493b0542d
|
d235d406283191fc7b9e1299be602f1e8be6f36cee8b183cf85c8660519a1c3b
|
12
src/btree.c
12
src/btree.c
@ -7637,7 +7637,9 @@ static int balance_nonroot(
|
|||||||
}
|
}
|
||||||
pgno = get4byte(pRight);
|
pgno = get4byte(pRight);
|
||||||
while( 1 ){
|
while( 1 ){
|
||||||
rc = getAndInitPage(pBt, pgno, &apOld[i], 0, 0);
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = getAndInitPage(pBt, pgno, &apOld[i], 0, 0);
|
||||||
|
}
|
||||||
if( rc ){
|
if( rc ){
|
||||||
memset(apOld, 0, (i+1)*sizeof(MemPage*));
|
memset(apOld, 0, (i+1)*sizeof(MemPage*));
|
||||||
goto balance_cleanup;
|
goto balance_cleanup;
|
||||||
@ -7676,12 +7678,10 @@ static int balance_nonroot(
|
|||||||
if( pBt->btsFlags & BTS_FAST_SECURE ){
|
if( pBt->btsFlags & BTS_FAST_SECURE ){
|
||||||
int iOff;
|
int iOff;
|
||||||
|
|
||||||
|
/* If the following if() condition is not true, the db is corrupted.
|
||||||
|
** The call to dropCell() below will detect this. */
|
||||||
iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
|
iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
|
||||||
if( (iOff+szNew[i])>(int)pBt->usableSize ){
|
if( (iOff+szNew[i])<=(int)pBt->usableSize ){
|
||||||
rc = SQLITE_CORRUPT_BKPT;
|
|
||||||
memset(apOld, 0, (i+1)*sizeof(MemPage*));
|
|
||||||
goto balance_cleanup;
|
|
||||||
}else{
|
|
||||||
memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);
|
memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);
|
||||||
apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
|
apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user