mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix the computation of the offset on the mmap() for the Nth shared memory
region. Because of the way shared memory is accessed, the old computation, though wrong, still happened to always get the right answer. Nevertheless, it is good to do the computation correctly. FossilOrigin-Name: 36397f62f2e3a62b4d5730b29c197449c6850cac
This commit is contained in:
@@ -3559,7 +3559,7 @@ static int unixShmMap(
|
||||
pShmNode->apRegion = apNew;
|
||||
while(pShmNode->nRegion<=iRegion){
|
||||
void *pMem = mmap(0, szRegion, PROT_READ|PROT_WRITE,
|
||||
MAP_SHARED, pShmNode->h, iRegion*szRegion
|
||||
MAP_SHARED, pShmNode->h, pShmNode->nRegion*szRegion
|
||||
);
|
||||
if( pMem==MAP_FAILED ){
|
||||
rc = SQLITE_IOERR;
|
||||
|
||||
Reference in New Issue
Block a user