Reviewers: Igor Sheludko,

Description:
Verify that heap object iterator stays withing page bound.

BUG=

Please review this at https://codereview.chromium.org/823583010/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+2, -1 lines):
  M src/heap/spaces-inl.h


Index: src/heap/spaces-inl.h
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
index d81d253e1b214e89ab2f4d6664f931cdc9c1d5b2..ceaa935aa31ff2630f0ec838fef1e402d8d5d7e9 100644
--- a/src/heap/spaces-inl.h
+++ b/src/heap/spaces-inl.h
@@ -90,7 +90,8 @@ HeapObject* HeapObjectIterator::FromCurrentPage() {
     HeapObject* obj = HeapObject::FromAddress(cur_addr_);
     int obj_size = (size_func_ == NULL) ? obj->Size() : size_func_(obj);
     cur_addr_ += obj_size;
-    DCHECK(cur_addr_ <= cur_end_);
+    // TODO(hpayer): Make this check a DCHECK.
+    CHECK(cur_addr_ <= cur_end_);
     if (!obj->IsFiller()) {
       DCHECK_OBJECT_SIZE(obj_size);
       return obj;


--
--
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/d/optout.

Reply via email to