Commit 58870fa9 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

ARM: Check that address given to __ RecordWrite is correct.

Review URL: http://codereview.chromium.org/8511052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4b4d75f8
......@@ -483,6 +483,15 @@ void MacroAssembler::RecordWrite(Register object,
// registers are cp.
ASSERT(!address.is(cp) && !value.is(cp));
if (FLAG_debug_code) {
Label ok;
ldr(ip, MemOperand(address));
cmp(ip, value);
b(eq, &ok);
stop("Wrong address or value passed to RecordWrite");
bind(&ok);
}
Label done;
if (smi_check == INLINE_SMI_CHECK) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment