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

Unified Diff: src/mips/macro-assembler-mips.cc

Issue 8561001: MIPS: Check that address given to __ RecordWrite is correct. (Closed)
Patch Set: Rebased on r10351 Created 8 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index cdacbf3c0d86cb588e0bfafbfd8392f017f447f4..78890ef91a764a6e00a6d8fc3d3c57f4a8fa25b9 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -252,6 +252,12 @@ void MacroAssembler::RecordWrite(Register object,
// registers are cp.
ASSERT(!address.is(cp) && !value.is(cp));
+ if (FLAG_debug_code) {
+ lw(at, MemOperand(address));
+ Assert(eq, "Wrong address or value passed to RecordWrite",
+ at, Operand(value));
+ }
+
Label done;
if (smi_check == INLINE_SMI_CHECK) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698