Reviewers: Erik Corry,

Description:
Merge r9145 from the bleeding_edge to the 3.4 branch.

Fix bug in Page::GetRegionMaskForSpan.

When checking for a wrap take into account offset of the start address in the
region.

BUG=http://crbug.com/94425
TEST=test/mjsunit/regress/regress-94425.js
Review URL: http://codereview.chromium.org/7779037
------------------------------------------------------------------------

Please review this at http://codereview.chromium.org/7739027/

SVN Base: http://v8.googlecode.com/svn/branches/3.4/

Affected files:
  M     src/spaces-inl.h
  M     src/version.cc
  A  +  test/mjsunit/regress/regress-94425.js


### BEGIN SVN COPY METADATA
#$ cp branches/bleeding_edge/test/mjsunit/regress/regress-94425.js test/mjsunit/regress/regress-94425.js
### END SVN COPY METADATA
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h    (revision 9145)
+++ src/spaces-inl.h    (working copy)
@@ -155,7 +155,8 @@

 uint32_t Page::GetRegionMaskForSpan(Address start, int length_in_bytes) {
   uint32_t result = 0;
-  if (length_in_bytes >= kPageSize) {
+  static const intptr_t kRegionMask = (1 << kRegionSizeLog2) - 1;
+  if (length_in_bytes + (OffsetFrom(start) & kRegionMask) >= kPageSize) {
     result = kAllRegionsDirtyMarks;
   } else if (length_in_bytes > 0) {
     int start_region = GetRegionNumberForAddress(start);
Index: src/version.cc
===================================================================
--- src/version.cc      (revision 9145)
+++ src/version.cc      (working copy)
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     4
 #define BUILD_NUMBER      14
-#define PATCH_LEVEL       18
+#define PATCH_LEVEL       19
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0
Index: test/mjsunit/regress/regress-94425.js


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to