Compare commits

...

2 Commits

Author SHA1 Message Date
Enrico Giordani
2d9ac61901 [Release] 3.0.503 2016-06-21 14:28:18 +02:00
Enrico Giordani
a7ded33103 [Fix] Possible AV during background save.
This fix is a refinement of a previous fix to avoid a possible AV if the buffer
to write to disk ends exactly at the last byte of a memory page.
2016-06-21 13:53:33 +02:00
7 changed files with 17 additions and 20 deletions

View File

@@ -1,5 +1,9 @@
MSOpenTech Redis on Windows 3.0 Release Notes
=============================================
--[ Redis on Windows 3.0.503 ] Release date: Jun 21 2016
- [Fix] Possible AV during background save.
--[ Redis on Windows 3.0.502 ] Release date: Jun 21 2016
- [PR] Fixed pointer overflow crash when using bgsave under rare circumstances. (by @Harachie)

View File

@@ -1,9 +1,9 @@
version: 3.0.502.{build}
version: 3.0.503.{build}
branches:
# whitelist
only:
- '2.8'
- '3.0'
- appveyor
install:

View File

@@ -21,7 +21,7 @@
<Product Id="*"
Name="Redis on Windows"
Language="1033"
Version="3.0.502"
Version="3.0.503"
Manufacturer="MSOpenTech"
UpgradeCode="{05410198-7212-4FC4-B7C8-AFEFC3DA0FBC}">
<Package InstallerVersion="200"

View File

@@ -3,7 +3,7 @@
<metadata>
<id>redis-64</id>
<title>Redis 64-bit</title>
<version>3.0.502</version>
<version>3.0.503</version>
<authors>Alexis Campailla, Enrico Giordani, Jonathan Pickett</authors>
<owners>Microsoft Open Technologies, Inc.</owners>
<description>A porting of Redis on Windows 64-bit.

View File

@@ -3,7 +3,7 @@
<metadata>
<id>redis-64</id>
<title>Redis 64-bit</title>
<version>3.0.502</version>
<version>3.0.503</version>
<authors>Alexis Campailla, Enrico Giordani, Jonathan Pickett</authors>
<owners>Microsoft Open Technologies, Inc.</owners>
<description>A porting of Redis on Windows 64-bit.

View File

@@ -29,20 +29,13 @@ namespace Globals
/* This function is used to force the VEH on the entire size of the buffer length,
* in the event that the buffer crosses the memory page boundaries */
void EnsureMemoryIsMapped(const void *buffer, size_t size) {
// Use 'volatile' to make sure the compiler doesn't remove "c = *((char*) (p + offset));"
volatile char c;
char* p = (char*) buffer;
char* pStart = p - ((size_t) p % Globals::pageSize);
char* pEnd = p + size;
if ((size_t) (pEnd - pStart) > Globals::pageSize) {
size_t offset = 0;
while (offset < size) {
offset += Globals::pageSize;
if (offset > size) {
offset = size;
}
c = *((char*) (p + offset));
}
char* pFirstByte = (char*) buffer;
char* pLastByte = (char*) buffer + size - 1;
char* pFirstPage = pFirstByte - ((size_t) pFirstByte % Globals::pageSize);
char* pLastPage = pLastByte - ((size_t) pLastByte % Globals::pageSize);
// Use 'volatile' to make sure the compiler doesn't remove the memory access
for (volatile char* p = pFirstPage; p <= pLastPage; p += Globals::pageSize) {
volatile char c = *p;
}
}

View File

@@ -1 +1 @@
#define REDIS_VERSION "3.0.502"
#define REDIS_VERSION "3.0.503"