From 1192ef939e5125ef543d8c1118cbdcba0f8523e8 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 1 Mar 2009 15:39:52 -0700 Subject: [PATCH] fix stack offset calculation for multianewarray on x86 --- src/compile.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compile.cpp b/src/compile.cpp index e6dd24559a..402ed31896 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -3427,9 +3427,11 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip, if (UNLIKELY(t->exception)) return; PROTECT(t, class_); - unsigned offset = localOffset - (t, localSize(t, context->method) + c->index(c->top()), - context->method) / BytesPerWord; + unsigned offset + = (localOffset + (t, localSize(t, context->method) + c->index(c->top()), + context->method) / BytesPerWord) + + t->arch->frameReturnAddressSize(); Compiler::Operand* result = c->call (c->constant(getThunk(t, makeMultidimensionalArrayThunk)),