/ Check-in [4eeea583]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add assert to the Windows VFS pertaining to the size of the SIZE_T type.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental-mmap
Files: files | file ages | folders
SHA1:4eeea58354e21797ca1f4dc4ea785d0330381f0b
User & Date: mistachkin 2013-04-02 20:13:04
Context
2013-04-02
20:19
Fix a bug in mmap2.test that was leaving an invalid sqlite3_log() callback installed, causing a crash. check-in: c0cdaa07 user: dan tags: experimental-mmap
20:13
Add assert to the Windows VFS pertaining to the size of the SIZE_T type. check-in: 4eeea583 user: mistachkin tags: experimental-mmap
18:33
Add test cases to mmap1.test and pagerfault.test. check-in: 3050136b user: dan tags: experimental-mmap
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

3601
3602
3603
3604
3605
3606
3607

3608
3609
3610
3611
3612
3613
3614
      /* Log the error, but continue normal operation using xRead/xWrite */
      return SQLITE_OK;
    }
    assert( (nMap % winSysInfo.dwPageSize)==0 );
#if SQLITE_OS_WINRT
    pNew = osMapViewOfFileFromApp(pFd->hMap, flags, 0, nMap);
#else

    pNew = osMapViewOfFile(pFd->hMap, flags, 0, 0, (SIZE_T)nMap);
#endif
    if( pNew==NULL ){
      osCloseHandle(pFd->hMap);
      pFd->hMap = NULL;
      pFd->lastErrno = osGetLastError();
      winLogError(SQLITE_IOERR_MMAP, pFd->lastErrno,







>







3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
      /* Log the error, but continue normal operation using xRead/xWrite */
      return SQLITE_OK;
    }
    assert( (nMap % winSysInfo.dwPageSize)==0 );
#if SQLITE_OS_WINRT
    pNew = osMapViewOfFileFromApp(pFd->hMap, flags, 0, nMap);
#else
    assert( sizeof(SIZE_T)==sizeof(sqlite3_int64) || nMap<=0xffffffff );
    pNew = osMapViewOfFile(pFd->hMap, flags, 0, 0, (SIZE_T)nMap);
#endif
    if( pNew==NULL ){
      osCloseHandle(pFd->hMap);
      pFd->hMap = NULL;
      pFd->lastErrno = osGetLastError();
      winLogError(SQLITE_IOERR_MMAP, pFd->lastErrno,