Revision: 3644
Author: [email protected]
Date: Tue Jan 19 04:27:04 2010
Log: X64: Fix bug that reads from rax instead of correct register.
Crashes if rax doesn't point to readable memory.
Recent change made rax contain garbage due to write-barrier computation.
(The fact that it hasn't crashed before highly suggests that the line does
nothing.)
Review URL: http://codereview.chromium.org/545117
http://code.google.com/p/v8/source/detail?r=3644
Modified:
/branches/bleeding_edge/src/x64/macro-assembler-x64.cc
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Mon Jan 18
03:22:03 2010
+++ /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Tue Jan 19
04:27:04 2010
@@ -2418,7 +2418,7 @@
// Move up the chain of contexts to the context containing the slot.
movq(dst, Operand(rsi, Context::SlotOffset(Context::CLOSURE_INDEX)));
// Load the function context (which is the incoming, outer context).
- movq(rax, FieldOperand(rax, JSFunction::kContextOffset));
+ movq(dst, FieldOperand(dst, JSFunction::kContextOffset));
for (int i = 1; i < context_chain_length; i++) {
movq(dst, Operand(dst, Context::SlotOffset(Context::CLOSURE_INDEX)));
movq(dst, FieldOperand(dst, JSFunction::kContextOffset));
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev