Reviewers: jochen (slow),

Description:
Add release build checks to back reference deserialization.

[email protected]
BUG=chromium:441896
LOG=N

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

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

Affected files (+2, -1 lines):
  M src/serialize.cc


Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index 0b9e9387c382b1c1c47f2c77092973e30695c22e..f381ca76c6411e8f6a5fda63a96d17537f3b43a2 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -835,10 +835,11 @@ HeapObject* Deserializer::GetBackReferencedObject(int space) {
     BackReference back_reference(source_.GetInt());
     DCHECK(space < kNumberOfPreallocatedSpaces);
     uint32_t chunk_index = back_reference.chunk_index();
-    DCHECK_LE(chunk_index, current_chunk_[space]);
+    CHECK_LE(chunk_index, current_chunk_[space]);
     uint32_t chunk_offset = back_reference.chunk_offset();
     obj = HeapObject::FromAddress(reservations_[space][chunk_index].start +
                                   chunk_offset);
+    CHECK_LE(obj, reservations_[space][chunk_index].end);
   }
   if (deserializing_user_code() && obj->IsInternalizedString()) {
     obj = String::cast(obj)->GetForwardedInternalizedString();


--
--
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