From bac4099acb0f6191fa55f68fe2a6fb4fe2dd517e Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 17 Aug 2012 12:47:38 -0600 Subject: [PATCH] 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. --- src/compile.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/compile.cpp b/src/compile.cpp index 50e2bfb9e2..e29f4e592a 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -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;