fix crash in findFrameMapInSimpleTable due to bug in instanceof implementation

We weren't adding entries to the frame map for calls to the instanceof
thunk when compiling methods.  However, that thunk may trigger a GC,
in which case we'll need to unwind the stack, which will lead to a
crash if we don't have a frame map entry for that instruction.
This commit is contained in:
Joel Dice 2012-08-17 12:47:38 -06:00
parent 3372210f45
commit bac4099acb

View File

@ -5064,21 +5064,18 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
object argument;
Thunk thunk;
TraceElement* trace;
if (LIKELY(class_)) {
argument = class_;
thunk = instanceOf64Thunk;
trace = 0;
} else {
argument = makePair(t, context->method, reference);
thunk = instanceOfFromReferenceThunk;
trace = frame->trace(0, 0);
}
frame->pushInt
(c->call
(c->constant(getThunk(t, thunk), Compiler::AddressType),
0, trace, 4, Compiler::IntegerType,
0, frame->trace(0, 0), 4, Compiler::IntegerType,
3, c->register_(t->arch->thread()), frame->append(argument),
instance));
} break;