Skip to content

Commit

Permalink
Merge pull request #13979 from gacholio/frame
Browse files Browse the repository at this point in the history
Move ASGCT resolve frame to proper scope
  • Loading branch information
tajila committed Nov 25, 2021
2 parents 0146461 + 7ae458c commit 5cbb929
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions runtime/j9vm/asgct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ protectedASGCT(J9PortLibrary *portLib, void *arg)
ASGCT_parms *parms = (ASGCT_parms*)arg;
J9VMThread *currentThread = BFUjavaVM->internalVMFunctions->currentVMThread(BFUjavaVM);
if (NULL != currentThread) {
J9SFJITResolveFrame resolveFrame = {0};
parms->currentThread = currentThread;
/* Back up the J9VMThread root values for restoration in the caller */
parms->pc = currentThread->pc;
Expand Down Expand Up @@ -163,13 +164,11 @@ protectedASGCT(J9PortLibrary *portLib, void *arg)
* stack in the signal handler. Update the J9VMThread roots to point to
* the resolve frame (will be restored in the caller).
*/
J9SFJITResolveFrame resolveFrame = {
NULL, /* savedJITException */
J9_SSF_JIT_RESOLVE, /* specialFrameFlags */
0, /* parmCount */
(U_8*)rip, /* returnAddress */
(UDATA*)(((U_8 *)rsp) + J9SF_A0_INVISIBLE_TAG) /* taggedRegularReturnSP */
};
resolveFrame.savedJITException = NULL;
resolveFrame.specialFrameFlags = J9_SSF_JIT_RESOLVE;
resolveFrame.parmCount = 0;
resolveFrame.returnAddress = (U_8*)rip;
resolveFrame.taggedRegularReturnSP = (UDATA*)(((U_8 *)rsp) + J9SF_A0_INVISIBLE_TAG);
currentThread->pc = (U_8*)J9SF_FRAME_TYPE_JIT_RESOLVE;
currentThread->arg0EA = (UDATA*)&(resolveFrame.taggedRegularReturnSP);
currentThread->literals = NULL;
Expand Down

0 comments on commit 5cbb929

Please sign in to comment.