Reviewers: Hannes Payer,
Message:
PTAL.
Description:
Deal with filler object map pointers in the ool constant pool correctly.
A constant pool can contain pointers to the FreeSpace map (e.g., due to code
being generated which needs to do a map-check on a FreeSpace object, and loa
the FreeSpace's map pointer from it's constant pool). This CL updates
StoreBuffer::FindPointersToNewSpaceOnPage such that if it sees one of these
pointers within a constant pool array it won't treat it as a filler object
(which would be wrong and would end up with the Size() method returning a ra
value as the filler's size).
BUG=
Please review this at https://codereview.chromium.org/183553003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+13, -0 lines):
M src/store-buffer.cc
Index: src/store-buffer.cc
diff --git a/src/store-buffer.cc b/src/store-buffer.cc
index
e89eb1bfed4a6a3803858ec13cffface8cea3689..b10ec96dfc7fb661bf9a2ca84261131db145cc28
100644
--- a/src/store-buffer.cc
+++ b/src/store-buffer.cc
@@ -523,12 +523,20 @@ void StoreBuffer::FindPointersToNewSpaceOnPage(
Address end_of_page = page->area_end();
Address visitable_end = visitable_start;
+ Address current_constant_pool_end = 0;
Object* free_space_map = heap_->free_space_map();
Object* two_pointer_filler_map = heap_->two_pointer_filler_map();
+ Object* constant_pool_array_map = heap_->constant_pool_array_map();
while (visitable_end < end_of_page) {
Object* o = *reinterpret_cast<Object**>(visitable_end);
+ if (o == constant_pool_array_map) {
+ // Constant pool arrays can contain pointers to the free_space_map or
+ // two_pointer_filler_map which should not be treated as fillers
objects.
+ current_constant_pool_end =
+ visitable_end + HeapObject::FromAddress(visitable_end)->Size();
+ }
// Skip fillers but not things that look like fillers in the special
// garbage section which can contain anything.
if (o == free_space_map ||
@@ -548,6 +556,11 @@ void StoreBuffer::FindPointersToNewSpaceOnPage(
}
if (visitable_end == space->top() && visitable_end !=
space->limit()) {
visitable_start = visitable_end = space->limit();
+ } else if (visitable_end <= current_constant_pool_end) {
+ // If we are still within a constant pool object then we don't
treat
+ // free_space_map or two_pointer_filler_map as filler objects,
since
+ // they are just pointers to the map objects used by compiled code.
+ visitable_end += kPointerSize;
} else {
// At this point we are either at the start of a filler or we are
at
// the point where the space->top() used to be before the
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.