Reviewers: Michael Starzinger,
Description:
Merge r10927 from the bleeding_edge to the 3.7 branch.
Ensure that inner pseudo-chunks are correctly initialized in
FreeQueuedChunks.
Fields introduced with guarding code space pages (area_start_, area_end_)
were
not correctly handled which lead to errors in StoreBuffer filtering.
[email protected]
TEST=mozilla/data/js1_5/GC/regress-203278-2.js
Review URL: https://chromiumcodereview.appspot.com/9600020
------------------------------------------------------------------------
Please review this at https://chromiumcodereview.appspot.com/9597026/
SVN Base: http://v8.googlecode.com/svn/branches/3.7/
Affected files:
M src/heap.cc
M src/spaces.h
M src/version.cc
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 10877)
+++ src/heap.cc (working copy)
@@ -6503,14 +6503,18 @@
// pieces and initialize size, owner and flags field of every piece.
// If FromAnyPointerAddress encounters a slot that belongs to one of
// these smaller pieces it will treat it as a slot on a normal Page.
+ Address chunk_end = chunk->address() + chunk->size();
MemoryChunk* inner = MemoryChunk::FromAddress(
chunk->address() + Page::kPageSize);
- MemoryChunk* inner_last = MemoryChunk::FromAddress(
- chunk->address() + chunk->size() - 1);
+ MemoryChunk* inner_last = MemoryChunk::FromAddress(chunk_end - 1);
while (inner <= inner_last) {
// Size of a large chunk is always a multiple of
// OS::AllocateAlignment() so there is always
// enough space for a fake MemoryChunk header.
+ Address area_end = Min(inner->address() + Page::kPageSize,
chunk_end);
+ // Guard against overflow.
+ if (area_end < inner->address()) area_end = chunk_end;
+ inner->SetArea(inner->address(), area_end);
inner->set_size(Page::kPageSize);
inner->set_owner(lo_space());
inner->SetFlag(MemoryChunk::ABOUT_TO_BE_FREED);
Index: src/spaces.h
===================================================================
--- src/spaces.h (revision 10877)
+++ src/spaces.h (working copy)
@@ -503,6 +503,11 @@
size_ = size;
}
+ void SetArea(Address area_start, Address area_end) {
+ area_start_ = area_start;
+ area_end_ = area_end;
+ }
+
Executability executable() {
return IsFlagSet(IS_EXECUTABLE) ? EXECUTABLE : NOT_EXECUTABLE;
}
Index: src/version.cc
===================================================================
--- src/version.cc (revision 10886)
+++ src/version.cc (working copy)
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 7
#define BUILD_NUMBER 12
-#define PATCH_LEVEL 27
+#define PATCH_LEVEL 28
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev