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

Unified Diff: src/heap/mark-compact.cc

Issue 1035763002: Add CHECKs when updating pointers from the slots and store buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updatser Created 5 years, 9 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 | « src/heap/heap-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 489b92aca987fd251128e262404e03baafbeaa41..ca35d4ab6d1eb8b9772e79f46fdaf4d7df28c7e5 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2884,6 +2884,8 @@ class PointersUpdatingVisitor : public ObjectVisitor {
// Avoid unnecessary changes that might unnecessary flush the instruction
// cache.
if (target != old_target) {
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095
+ CHECK(target->IsHeapObject() == old_target->IsHeapObject());
rinfo->set_target_object(target);
}
}
@@ -2894,6 +2896,8 @@ class PointersUpdatingVisitor : public ObjectVisitor {
Object* old_target = target;
VisitPointer(&target);
if (target != old_target) {
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095
+ CHECK(target->IsHeapObject() == old_target->IsHeapObject());
rinfo->set_target_address(Code::cast(target)->instruction_start());
}
}
@@ -2904,6 +2908,8 @@ class PointersUpdatingVisitor : public ObjectVisitor {
DCHECK(stub != NULL);
VisitPointer(&stub);
if (stub != rinfo->code_age_stub()) {
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095
+ CHECK(stub->IsHeapObject() == rinfo->code_age_stub()->IsHeapObject());
rinfo->set_code_age_stub(Code::cast(stub));
}
}
@@ -2915,6 +2921,9 @@ class PointersUpdatingVisitor : public ObjectVisitor {
rinfo->IsPatchedDebugBreakSlotSequence()));
Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
VisitPointer(&target);
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095
+ CHECK(target->IsCode() &&
+ HAS_SMI_TAG(Code::cast(target)->instruction_start()));
rinfo->set_call_address(Code::cast(target)->instruction_start());
}
@@ -3059,6 +3068,9 @@ static void UpdatePointer(HeapObject** address, HeapObject* object) {
object->GetHeap()->lo_space()->FindPage(
reinterpret_cast<Address>(address)) != NULL);
if (map_word.IsForwardingAddress()) {
+ // TODO(jochen): Remove again after fixing http://crbug.com/452095
+ CHECK((*address)->IsHeapObject() ==
+ map_word.ToForwardingAddress()->IsHeapObject());
// Update the corresponding slot.
*address = map_word.ToForwardingAddress();
}
« no previous file with comments | « src/heap/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698