Skip to content

Commit

Permalink
Merge pull request #17318 from babsingh/fix_jvmtiGetStackTrace
Browse files Browse the repository at this point in the history
Fix jvmtiGetStackTrace
  • Loading branch information
gacholio committed May 2, 2023
2 parents 85db8ab + 916ac8e commit c5e24ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/jvmti/jvmtiStackFrame.c
Expand Up @@ -62,13 +62,14 @@ jvmtiGetStackTrace(jvmtiEnv* env,
currentThread, thread, &targetThread, JVMTI_ERROR_NONE,
J9JVMTI_GETVMTHREAD_ERROR_ON_DEAD_THREAD);
if (rc == JVMTI_ERROR_NONE) {
j9object_t threadObject = (NULL == thread) ? currentThread->threadObject : J9_JNI_UNWRAP_REFERENCE(thread);
j9object_t threadObject = NULL;
#if JAVA_SPEC_VERSION >= 19
if (NULL != targetThread)
#endif /* JAVA_SPEC_VERSION >= 19 */
{
vmFuncs->haltThreadForInspection(currentThread, targetThread);
}
threadObject = (NULL == thread) ? currentThread->threadObject : J9_JNI_UNWRAP_REFERENCE(thread);
rc = jvmtiInternalGetStackTrace(env, currentThread, targetThread, threadObject, start_depth, (UDATA) max_frame_count, frame_buffer, &rv_count);
#if JAVA_SPEC_VERSION >= 19
if (NULL != targetThread)
Expand Down

0 comments on commit c5e24ed

Please sign in to comment.