Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: src/heap/spaces-inl.h

Issue 823583010: Verify that heap object iterator stays within page bound. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces-inl.h
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
index d81d253e1b214e89ab2f4d6664f931cdc9c1d5b2..9cb292e3df4adfdf53e3b716560df5399479cc43 100644
--- a/src/heap/spaces-inl.h
+++ b/src/heap/spaces-inl.h
@@ -91,6 +91,12 @@ HeapObject* HeapObjectIterator::FromCurrentPage() {
int obj_size = (size_func_ == NULL) ? obj->Size() : size_func_(obj);
cur_addr_ += obj_size;
DCHECK(cur_addr_ <= cur_end_);
+ // TODO(hpayer): Remove the debugging code.
+ if (cur_addr_ > cur_end_) {
+ space_->heap()->isolate()->PushStackTraceAndDie(0xaaaaaaaa, obj, NULL,
+ obj_size);
+ }
+
if (!obj->IsFiller()) {
DCHECK_OBJECT_SIZE(obj_size);
return obj;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698