Add missing write barriers to Object::Clone, LinkInterfaceMethods
These functions were using memcpy without a write barrier, causing the sticky mark bits GC to occasionally corrupt the heap.
Added missing write barriers.
Change-Id: Ie1c483904e095bda467e6c000f2659a3332116ae
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 6e3d903..32e6c39 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -3093,8 +3093,7 @@
}
if (miranda_method.get() == NULL) {
// point the interface table at a phantom slot
- miranda_method.reset(AllocMethod());
- memcpy(miranda_method.get(), interface_method, sizeof(Method));
+ miranda_method.reset(down_cast<Method*>(interface_method->Clone()));
miranda_list.push_back(miranda_method.get());
}
method_array->Set(j, miranda_method.get());