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

Unified Diff: runtime/vm/scavenger.cc

Issue 975443003: Catch corrupted pointers earlier. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 | « runtime/vm/raw_object.h ('k') | runtime/vm/scavenger_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
===================================================================
--- runtime/vm/scavenger.cc (revision 44128)
+++ runtime/vm/scavenger.cc (working copy)
@@ -155,10 +155,6 @@
return;
}
- // Objects should be contained in the heap.
- // TODO(iposva): Add an appropriate assert here or in the return block
- // below.
-
// The scavenger is only interested in objects located in the from space.
//
// We are using address math here and relying on the unsigned underflow
@@ -165,6 +161,7 @@
// in the code below to avoid having two checks.
uword obj_offset = reinterpret_cast<uword>(raw_obj) - from_start_;
if (obj_offset > from_size_) {
+ ASSERT(scavenger_->to_->Contains(RawObject::ToAddr(raw_obj)));
return;
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/scavenger_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698