On 2015/06/25 19:59:52, arv wrote:
I fixed the push/pop discrepancy and now both mips and mips64 error out with
"Unaligned write".

The unaligned write is because the stack pointer is corrupted when we try to pop
all the arguments off the stack at end of function, by using argument count.
    __ lw(a1, MemOperand(sp, offset));
    // Leave construct frame.
  }
  __ sll(t0, a1, kPointerSizeLog2 - 1);
  __ Addu(sp, sp, t0);
  __ Addu(sp, sp, kPointerSize);

a1 gets loaded with some tagged pointer, rather than the argument count, so
after this sequence the stack pointer is wrong, but also not a multiple of
kPointerSize, so the next access is 'unaligned'.

The problem is still here:
  0x3d427d30  8fa20000       lw      v0, 0(sp)               00000002 <--
[f5381e60]    (65892)
  0x3d427d34  8fa50004       lw      a1, 4(sp)               3d427941 <--
[f5381e64]    (65893)

The smi arg size goes into v0, which should have the receiver. But I've still
not seen where things are going off track. If it helps you, here is memory
around the sp near f5381e60:

sim> mem 0xf5381e50
  0xf5381e50:  0xf5381e70 -180871568 (smi -90435784)
  0xf5381e54:  0x3d427d08 1027767560 (smi 513883780)
0xf5381e58: 0x3b01940d 989959181 (0x3b01940d <a Boolean with map 0x30a09891
value = 0x25808211 <true>>)
0xf5381e5c: 0x3b01940d 989959181 (0x3b01940d <a Boolean with map 0x30a09891
value = 0x25808211 <true>>)
  0xf5381e60:  0x00000002          2 (smi 1)
  0xf5381e64:  0x3d427941 1027766593 (0x3d427941 <Code: BUILTIN>)
  0xf5381e68:  0x00000012         18 (smi 9)
  0xf5381e6c:  0x3b016efd  989949693 (0x3b016efd <FixedArray[64]>)
  0xf5381e70:  0xf5381f14 -180871404 (smi -90435702)
  0xf5381e74:  0x3d442678 1027876472 (smi 513938236)

Looks like arm port is failing in same spot. I'll keep looking....


https://codereview.chromium.org/1203813002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to