--- a/src/hotspot/share/prims/jvmtiEnvBase.cpp Thu Jul 12 16:30:47 2018 +0200
+++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp Wed Jul 11 16:11:10 2018 +0200
@@ -1219,7 +1219,7 @@
}
infop->state = state;
- if (thr != NULL || (state & JVMTI_THREAD_STATE_ALIVE) != 0) {
+ if (thr != NULL && (state & JVMTI_THREAD_STATE_ALIVE) != 0) {
infop->frame_buffer = NEW_RESOURCE_ARRAY(jvmtiFrameInfo, max_frame_count());
env()->get_stack_trace(thr, 0, max_frame_count(),
infop->frame_buffer, &(infop->frame_count));