Skip to content

Commit

Permalink
Replaces uses of currentThread with walkThread in jswalk
Browse files Browse the repository at this point in the history
There are cases where a non JVM thread may trigger a javacore. In these
cases the currentThread will be NULL. This will cause crashes when we
need to walk certain jit frames as the currentThread is used to
facilitate this. This PR replaces uses of currentThread with walkThread
in these cases.

Signed-off-by: Tobi Ajila <[email protected]>
  • Loading branch information
tajila committed Feb 18, 2022
1 parent 3473378 commit 244a57a
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 42 deletions.
4 changes: 2 additions & 2 deletions runtime/codert_vm/CodertVMHelpers.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2021 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -323,7 +323,7 @@ jitGetExceptionCatcher(J9VMThread *currentThread, void *handlerPC, J9JITExceptio
* because jitGetMapsFromPC is expecting a return address, so it subtracts 1. The value passed in is
* the start address of the compiled exception handler.
*/
jitGetMapsFromPC(currentThread, metaData, (UDATA)handlerPC + 1, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, currentThread->javaVM, metaData, (UDATA)handlerPC + 1, &stackMap, &inlineMap);
Assert_CodertVM_false(NULL == inlineMap);
if (NULL != getJitInlinedCallInfo(metaData)) {
inlinedCallSite = getFirstInlinedCallSite(metaData, inlineMap);
Expand Down
2 changes: 1 addition & 1 deletion runtime/codert_vm/cnathelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ slow_jitMonitorEnterImpl(J9VMThread *currentThread, bool forMethod)
J9JavaVM *vm = currentThread->javaVM;
J9JITExceptionTable *metaData = vm->jitConfig->jitGetExceptionTableFromPC(currentThread, (UDATA)oldPC);
Assert_CodertVM_false(NULL == metaData);
jitGetMapsFromPC(currentThread, metaData, (UDATA)oldPC, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, vm, metaData, (UDATA)oldPC, &stackMap, &inlineMap);
Assert_CodertVM_false(NULL == inlineMap);
if ((NULL == getJitInlinedCallInfo(metaData)) || (NULL == getFirstInlinedCallSite(metaData, inlineMap))) {
J9SFJITResolveFrame *resolveFrame = (J9SFJITResolveFrame*)currentThread->sp;
Expand Down
6 changes: 3 additions & 3 deletions runtime/codert_vm/decomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ c_jitDecompileAtExceptionCatch(J9VMThread * currentThread)
* because jitGetMapsFromPC is expecting a return address, so it subtracts 1. The value stored in the
* decomp record is the start address of the compiled exception handler.
*/
jitGetMapsFromPC(currentThread, metaData, (UDATA)jitPC + 1, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, vm, metaData, (UDATA)jitPC + 1, &stackMap, &inlineMap);
Assert_CodertVM_false(NULL == inlineMap);
if (NULL != getJitInlinedCallInfo(metaData)) {
inlinedCallSite = getFirstInlinedCallSite(metaData, inlineMap);
Expand Down Expand Up @@ -1853,7 +1853,7 @@ osrAllFramesSize(J9VMThread *currentThread, J9JITExceptionTable *metaData, void
void * inlineMap = NULL;

/* Count the inlined methods */
jitGetMapsFromPC(currentThread, metaData, (UDATA)jitPC, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, currentThread->javaVM, metaData, (UDATA)jitPC, &stackMap, &inlineMap);
Assert_CodertVM_false(NULL == inlineMap);
if (NULL != getJitInlinedCallInfo(metaData)) {
void *inlinedCallSite = getFirstInlinedCallSite(metaData, inlineMap);
Expand Down Expand Up @@ -2190,7 +2190,7 @@ initializeOSRBuffer(J9VMThread *currentThread, J9OSRBuffer *osrBuffer, J9OSRData
U_16 numberOfMapBits = 0;

/* Get the stack map, inline map and live monitor metadata */
jitGetMapsFromPC(currentThread, metaData, (UDATA)jitPC, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, currentThread->javaVM, metaData, (UDATA)jitPC, &stackMap, &inlineMap);
liveMonitorMap = getJitLiveMonitors(metaData, stackMap);
gcStackAtlas = (J9JITStackAtlas *)getJitGCStackAtlas(metaData);
numberOfMapBits = getJitNumberOfMapBytes(gcStackAtlas) << 3;
Expand Down
18 changes: 9 additions & 9 deletions runtime/codert_vm/jswalk.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2021 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -186,7 +186,7 @@ UDATA jitWalkStackFrames(J9StackWalkState *walkState)
walkState->outgoingArgCount = walkState->argCount;

if ((!(walkState->flags & J9_STACKWALK_SKIP_INLINES)) && getJitInlinedCallInfo(walkState->jitInfo)) {
jitGetMapsFromPC(walkState->currentThread, walkState->jitInfo, (UDATA) walkState->pc, &(walkState->stackMap), &(walkState->inlineMap));
jitGetMapsFromPC(walkState->currentThread, walkState->javaVM, walkState->jitInfo, (UDATA) walkState->pc, &(walkState->stackMap), &(walkState->inlineMap));
if (NULL != walkState->inlineMap) {
walkState->inlinedCallSite = getFirstInlinedCallSite(walkState->jitInfo, walkState->inlineMap);

Expand Down Expand Up @@ -217,7 +217,7 @@ UDATA jitWalkStackFrames(J9StackWalkState *walkState)
}
}
} else if (walkState->flags & J9_STACKWALK_RECORD_BYTECODE_PC_OFFSET) {
jitGetMapsFromPC(walkState->currentThread, walkState->jitInfo, (UDATA) walkState->pc, &(walkState->stackMap), &(walkState->inlineMap));
jitGetMapsFromPC(walkState->currentThread, walkState->javaVM, walkState->jitInfo, (UDATA) walkState->pc, &(walkState->stackMap), &(walkState->inlineMap));
}

SET_A0_CP_METHOD(walkState);
Expand Down Expand Up @@ -517,7 +517,7 @@ static void jitWalkFrame(J9StackWalkState *walkState, UDATA walkLocals, void *st
WALK_METHOD_CLASS(walkState);

if (stackMap == NULL) {
stackMap = getStackMapFromJitPC(walkState->currentThread, walkState->jitInfo, (UDATA) walkState->pc);
stackMap = getStackMapFromJitPC(walkState->currentThread, walkState->javaVM, walkState->jitInfo, (UDATA) walkState->pc);
if (stackMap == NULL) {
if (J9_ARE_ANY_BITS_SET(walkState->flags, J9_STACKWALK_NO_ERROR_REPORT)) {
return;
Expand Down Expand Up @@ -1061,7 +1061,7 @@ static void jitWalkResolveMethodFrame(J9StackWalkState *walkState)
}
return;
}
jitGetMapsFromPC(walkState->currentThread, metaData, (UDATA)walkState->pc, &stackMap, &inlineMap);
jitGetMapsFromPC(walkState->currentThread, walkState->javaVM, metaData, (UDATA)walkState->pc, &stackMap, &inlineMap);

/* If there are no inlines, use the outer method. Otherwise, use the innermost inline at the current PC */

Expand Down Expand Up @@ -1680,7 +1680,7 @@ jitGetOwnedObjectMonitors(J9StackWalkState *walkState)
}

/* get the stackmap and inline map for the given pc (this is a single walk of jit metadata) */
jitGetMapsFromPC(walkState->currentThread, walkState->jitInfo, (UDATA)walkState->pc, &stackMap, &inlineMap);
jitGetMapsFromPC(walkState->currentThread, walkState->javaVM, walkState->jitInfo, (UDATA)walkState->pc, &stackMap, &inlineMap);

/* get a slot map of all live monitors on the JIT frame. May include slots from inlined methods */
liveMonitorMap = getJitLiveMonitors(walkState->jitInfo, stackMap);
Expand Down Expand Up @@ -1732,7 +1732,7 @@ countOwnedObjectMonitors(J9StackWalkState *walkState)
U_16 numberOfMapBits;

/* get the stackmap and inline map for the given pc (this is a single walk of jit metadata) */
jitGetMapsFromPC(walkState->currentThread, walkState->jitInfo, (UDATA)walkState->pc, &stackMap, &inlineMap);
jitGetMapsFromPC(walkState->currentThread, walkState->javaVM, walkState->jitInfo, (UDATA)walkState->pc, &stackMap, &inlineMap);

/* get a slot map of all live monitors on the JIT frame. May include slots from inlined methods */
liveMonitorMap = getJitLiveMonitors(walkState->jitInfo, stackMap);
Expand Down Expand Up @@ -1779,7 +1779,7 @@ walkLiveMonitorSlots(J9StackWalkState *walkState, J9JITStackAtlas *gcStackAtlas,
U_8 bit;
J9VMThread *currentThread = walkState->currentThread;
J9VMThread *targetThread = walkState->walkThread;
J9InternalVMFunctions const * const vmFuncs = currentThread->javaVM->internalVMFunctions;
J9InternalVMFunctions const * const vmFuncs = walkState->javaVM->internalVMFunctions;

for (i = 0; i < numberOfMapBits; ++i) {
bit = liveMonitorMap[i >> 3] & monitorMask[i >> 3] & (1 << (i & 7));
Expand Down Expand Up @@ -1819,7 +1819,7 @@ countLiveMonitorSlots(J9StackWalkState *walkState, J9JITStackAtlas *gcStackAtlas
U_8 bit;
J9VMThread *currentThread = walkState->currentThread;
J9VMThread *targetThread = walkState->walkThread;
J9InternalVMFunctions const * const vmFuncs = currentThread->javaVM->internalVMFunctions;
J9InternalVMFunctions const * const vmFuncs = walkState->javaVM->internalVMFunctions;

for (i = 0; i < numberOfMapBits; ++i) {
bit = liveMonitorMap[i >> 3] & monitorMask[i >> 3];
Expand Down
23 changes: 11 additions & 12 deletions runtime/compiler/runtime/MethodMetaData.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2021 IBM Corp. and others
* Copyright (c) 2000, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -224,16 +224,15 @@ static VMINLINE TR_StackMapTable * initializeMapTable(J9JavaVM * javaVM, J9TR_Me
return mapTable;
}

static VMINLINE TR_StackMapTable * findOrCreateMapTable(J9VMThread * currentThread, J9TR_MethodMetaData * metaData, UDATA fourByteOffsets)
static VMINLINE TR_StackMapTable * findOrCreateMapTable(J9VMThread * currentThread, J9JavaVM * javaVM, J9TR_MethodMetaData * metaData, UDATA fourByteOffsets)
{
TR_StackMapTable * mapTablePtr = 0;
assert(metaData);

// In a signal handler, do not use or create the map tables. The tables may be in an inconsistent
// state when interrupted by the signal, and malloc must not be called from a signal handler.
if (J9_ARE_NO_BITS_SET(currentThread->privateFlags2, J9_PRIVATE_FLAGS2_ASYNC_GET_CALL_TRACE))
if ((NULL != currentThread) && J9_ARE_NO_BITS_SET(currentThread->privateFlags2, J9_PRIVATE_FLAGS2_ASYNC_GET_CALL_TRACE))
{
J9JavaVM * javaVM = currentThread->javaVM;
if (metaData->bodyInfo &&
(javaVM->phase == J9VM_PHASE_NOT_STARTUP || 0 == (javaVM->jitConfig->runtimeFlags & J9JIT_QUICKSTART))) // save footprint during startup in Xquickstart mode
{
Expand Down Expand Up @@ -404,7 +403,7 @@ static void fastwalkDebug(J9TR_MethodMetaData * methodMetaData, UDATA offsetPC,
}
#endif /* defined(DEBUG) */

void jitGetMapsFromPC(J9VMThread * currentThread, J9TR_MethodMetaData * methodMetaData, UDATA jitPC, void * * stackMap, void * * inlineMap)
void jitGetMapsFromPC(J9VMThread * currentThread, J9JavaVM * vm, J9TR_MethodMetaData * methodMetaData, UDATA jitPC, void * * stackMap, void * * inlineMap)
{
TR_MapIterator i;
TR_StackMapTable * stackMapTable = 0;
Expand Down Expand Up @@ -435,7 +434,7 @@ void jitGetMapsFromPC(J9VMThread * currentThread, J9TR_MethodMetaData * methodMe

#ifdef FASTWALK

stackMapTable = findOrCreateMapTable(currentThread, methodMetaData, fourByteOffsets);
stackMapTable = findOrCreateMapTable(currentThread, vm, methodMetaData, fourByteOffsets);

if (stackMapTable)
{
Expand Down Expand Up @@ -525,17 +524,17 @@ void jitGetMapsFromPC(J9VMThread * currentThread, J9TR_MethodMetaData * methodMe
}
}

void * jitGetInlinerMapFromPC(J9VMThread * currentThread, J9TR_MethodMetaData * methodMetaData, UDATA jitPC)
void * jitGetInlinerMapFromPC(J9VMThread * currentThread, J9JavaVM * vm, J9TR_MethodMetaData * methodMetaData, UDATA jitPC)
{
void * stackMap, * inlineMap;
jitGetMapsFromPC(currentThread, methodMetaData, jitPC, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, vm, methodMetaData, jitPC, &stackMap, &inlineMap);
return inlineMap;
}

void * getStackMapFromJitPC(J9VMThread * currentThread, J9TR_MethodMetaData * methodMetaData, UDATA jitPC)
void * getStackMapFromJitPC(J9VMThread * currentThread, J9JavaVM * vm, J9TR_MethodMetaData * methodMetaData, UDATA jitPC)
{
void * stackMap, * inlineMap;
jitGetMapsFromPC(currentThread, methodMetaData, jitPC, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, vm, methodMetaData, jitPC, &stackMap, &inlineMap);
return stackMap;
}

Expand All @@ -551,7 +550,7 @@ void * getStackAllocMapFromJitPC(J9VMThread * currentThread, J9TR_MethodMetaData
if (curStackMap)
stackMap = curStackMap;
else
stackMap = getStackMapFromJitPC(currentThread, methodMetaData, jitPC);
stackMap = getStackMapFromJitPC(currentThread, currentThread->javaVM, methodMetaData, jitPC);

stackAllocMap = (void **)((J9JITStackAtlas *) methodMetaData->gcStackAtlas)->stackAllocMap;
if (stackAllocMap)
Expand Down Expand Up @@ -2447,7 +2446,7 @@ void* preOSR(J9VMThread* currentThread, J9JITExceptionTable *metaData, void *pc)
assert(metaData);
assert(metaData->osrInfo);

jitGetMapsFromPC(currentThread, metaData, (UDATA) pc, &stackMap, &inlineMap);
jitGetMapsFromPC(currentThread, currentThread->javaVM, metaData, (UDATA) pc, &stackMap, &inlineMap);
bcInfo = (TR_ByteCodeInfo*) getByteCodeInfoFromStackMap(metaData, inlineMap);
/*
printf("offset=%08X bytecode.caller=%d bytecode.index=%x\n",
Expand Down
8 changes: 4 additions & 4 deletions runtime/compiler/runtime/MethodMetaData.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2021 IBM Corp. and others
* Copyright (c) 2000, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -240,11 +240,11 @@ typedef struct TR_MapIterator
} \
}

void * getStackMapFromJitPC(J9VMThread * currentThread, J9TR_MethodMetaData * exceptionTable, UDATA jitPC);
void * getStackMapFromJitPC(J9VMThread * currentThread, J9JavaVM * vm, J9TR_MethodMetaData * exceptionTable, UDATA jitPC);
void * getStackAllocMapFromJitPC(J9VMThread * currentThread, J9TR_MethodMetaData * exceptionTable, UDATA jitPC, void *curStackMap);
UDATA jitExceptionHandlerSearch(J9VMThread * currentThread, J9StackWalkState * walkState);
void * jitGetInlinerMapFromPC(J9VMThread * currentThread, J9JITExceptionTable * exceptionTable, UDATA jitPC);
void jitGetMapsFromPC(J9VMThread * currentThread, J9JITExceptionTable * exceptionTable, UDATA jitPC, void * * inlineMap, void * * stackMap);
void * jitGetInlinerMapFromPC(J9VMThread * currentThread, J9JavaVM * vm, J9JITExceptionTable * exceptionTable, UDATA jitPC);
void jitGetMapsFromPC(J9VMThread * currentThread, J9JavaVM * vm, J9JITExceptionTable * exceptionTable, UDATA jitPC, void * * inlineMap, void * * stackMap);
void * getFirstInlineRange(TR_MapIterator * i, void * methodMetaData, UDATA * startOffset, UDATA * endOffset);
void * getNextInlineRange(TR_MapIterator * i, UDATA * startOffset, UDATA * endOffset);
void walkJITFrameSlotsForInternalPointers(J9StackWalkState * walkState, U_8 ** jitDescriptionCursor, UDATA * scanCursor, void *stackMap, J9JITStackAtlas *gcStackAtlas);
Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/runtime/SignalHandler.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2021 IBM Corp. and others
* Copyright (c) 2000, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -398,7 +398,7 @@ UDATA jitX86Handler(J9VMThread* vmThread, U_32 sigType, void* sigInfo)
}
}

stackMap = jitConfig->jitGetStackMapFromPC(vmThread, exceptionTable, (UDATA) (eip + 1));
stackMap = jitConfig->jitGetStackMapFromPC(vmThread, vmThread->javaVM, exceptionTable, (UDATA) (eip + 1));
if (stackMap ) {
registerMap = jitConfig->getJitRegisterMap(exceptionTable, stackMap);
*espPtr += (((registerMap >> 16) & 0xFF) * sizeof(UDATA));
Expand Down
9 changes: 5 additions & 4 deletions runtime/oti/j9nonbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -2461,6 +2461,7 @@ typedef struct J9I2JState {
typedef struct J9StackWalkState {
struct J9StackWalkState* previous;
struct J9VMThread* walkThread;
struct J9JavaVM* javaVM;
UDATA flags;
UDATA* bp;
UDATA* unwindSP;
Expand Down Expand Up @@ -2516,7 +2517,7 @@ typedef struct J9StackWalkState {
/* The size of J9StackWalkState must be a multiple of 8 because it is inlined into
* J9VMThread where alignment assumotions are being made.
*/
#if 1 && !defined(J9VM_ENV_DATA64) /* Change to 0 or 1 based on number of fields above */
#if 0 && !defined(J9VM_ENV_DATA64) /* Change to 0 or 1 based on number of fields above */
U_32 padTo8;
#endif /* !J9VM_ENV_DATA64 */
} J9StackWalkState;
Expand Down Expand Up @@ -3916,11 +3917,11 @@ typedef struct J9JITConfig {
UDATA codeCacheTotalKB;
UDATA dataCacheTotalKB;
struct J9JITExceptionTable* ( *jitGetExceptionTableFromPC)(struct J9VMThread * vmThread, UDATA jitPC) ;
void* ( *jitGetStackMapFromPC)(struct J9VMThread * currentThread, struct J9JITExceptionTable * exceptionTable, UDATA jitPC) ;
void* ( *jitGetInlinerMapFromPC)(struct J9VMThread * currentThread, struct J9JITExceptionTable * exceptionTable, UDATA jitPC) ;
void* ( *jitGetStackMapFromPC)(struct J9VMThread * currentThread, struct J9JavaVM * vm, struct J9JITExceptionTable * exceptionTable, UDATA jitPC) ;
void* ( *jitGetInlinerMapFromPC)(struct J9VMThread * currentThread, struct J9JavaVM * vm, struct J9JITExceptionTable * exceptionTable, UDATA jitPC) ;
UDATA ( *getJitInlineDepthFromCallSite)(struct J9JITExceptionTable *metaData, void *inlinedCallSite) ;
void* ( *getJitInlinedCallInfo)(struct J9JITExceptionTable * md) ;
void* ( *getStackMapFromJitPC)(struct J9VMThread * currentThread, struct J9JITExceptionTable * exceptionTable, UDATA jitPC) ;
void* ( *getStackMapFromJitPC)(struct J9VMThread * currentThread, struct J9JavaVM * vm, struct J9JITExceptionTable * exceptionTable, UDATA jitPC) ;
void* ( *getFirstInlinedCallSite)(struct J9JITExceptionTable * metaData, void * stackMap) ;
void* ( *getNextInlinedCallSite)(struct J9JITExceptionTable * metaData, void * inlinedCallSite) ;
UDATA ( *hasMoreInlinedMethods)(void * inlinedCallSite) ;
Expand Down
6 changes: 3 additions & 3 deletions runtime/oti/j9protos.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2021 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -1377,8 +1377,8 @@ extern J9_CFUNC UDATA hasMoreInlinedMethods (void * inlinedCallSite);
extern J9_CFUNC UDATA getByteCodeIndex (void * inlinedCallSite);
extern J9_CFUNC void jitReportDynamicCodeLoadEvents (J9VMThread * currentThread);
extern J9_CFUNC UDATA getJitInlineDepthFromCallSite (J9JITExceptionTable *metaData, void *inlinedCallSite);
extern J9_CFUNC void* jitGetInlinerMapFromPC (J9VMThread * currentThread, J9JITExceptionTable * exceptionTable, UDATA jitPC);
extern J9_CFUNC void* getStackMapFromJitPC (J9VMThread * currentThread, struct J9JITExceptionTable * exceptionTable, UDATA jitPC);
extern J9_CFUNC void* jitGetInlinerMapFromPC (J9VMThread * currentThread, J9JavaVM * vm, J9JITExceptionTable * exceptionTable, UDATA jitPC);
extern J9_CFUNC void* getStackMapFromJitPC (J9VMThread * currentThread, J9JavaVM * vm, struct J9JITExceptionTable * exceptionTable, UDATA jitPC);
extern J9_CFUNC UDATA getCurrentByteCodeIndexAndIsSameReceiver (J9JITExceptionTable *metaData, void *stackMap, void *currentInlinedCallSite, UDATA * isSameReceiver);
extern J9_CFUNC void clearFPStack (void);
extern J9_CFUNC void jitExclusiveVMShutdownPending (J9VMThread *vmThread);
Expand Down
4 changes: 2 additions & 2 deletions runtime/vm/exceptiondescribe.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2021 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -279,7 +279,7 @@ iterateStackTrace(J9VMThread * vmThread, j9object_t* exception, callback_func_t
if (jitConfig) {
metaData = jitConfig->jitGetExceptionTableFromPC(vmThread, methodPC);
if (metaData) {
inlineMap = jitConfig->jitGetInlinerMapFromPC(vmThread, metaData, methodPC);
inlineMap = jitConfig->jitGetInlinerMapFromPC(vmThread, vm, metaData, methodPC);
if (inlineMap) {
inlinedCallSite = jitConfig->getFirstInlinedCallSite(metaData, inlineMap);
if (inlinedCallSite) {
Expand Down
1 change: 1 addition & 0 deletions runtime/vm/swalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ UDATA walkStackFrames(J9VMThread *currentThread, J9StackWalkState *walkState)
currentThread->activeWalkState = walkState;
}

walkState->javaVM = walkState->walkThread->javaVM;
walkState->currentThread = currentThread;
walkState->cache = NULL;
walkState->framesWalked = 0;
Expand Down

0 comments on commit 244a57a

Please sign in to comment.