< prev index next >
src/hotspot/share/prims/jvmtiEnvThreadState.cpp
Print this page
rev 54061 : 8261262: Kitchensink24HStress.java crashed with EXCEPTION_ACCESS_VIOLATION
Reviewed-by: dcubed, sspitsyn
*** 254,274 ****
void doit() {
ResourceMark rmark; // _thread != Thread::current()
RegisterMap rm(_thread, false);
// There can be a race condition between a VM_Operation reaching a safepoint
// and the target thread exiting from Java execution.
! // We must recheck the last Java frame still exists.
if (!_thread->is_exiting() && _thread->has_last_Java_frame()) {
javaVFrame* vf = _thread->last_java_vframe(&rm);
! assert(vf != NULL, "must have last java frame");
Method* method = vf->method();
_method_id = method->jmethod_id();
_bci = vf->bci();
! } else {
! // Clear current location as the target thread has no Java frames anymore.
! _method_id = (jmethodID)NULL;
! _bci = 0;
}
}
void get_current_location(jmethodID *method_id, int *bci) {
*method_id = _method_id;
*bci = _bci;
--- 254,271 ----
void doit() {
ResourceMark rmark; // _thread != Thread::current()
RegisterMap rm(_thread, false);
// There can be a race condition between a VM_Operation reaching a safepoint
// and the target thread exiting from Java execution.
! // We must recheck that the last Java frame still exists.
if (!_thread->is_exiting() && _thread->has_last_Java_frame()) {
javaVFrame* vf = _thread->last_java_vframe(&rm);
! if (vf != NULL) {
Method* method = vf->method();
_method_id = method->jmethod_id();
_bci = vf->bci();
! }
}
}
void get_current_location(jmethodID *method_id, int *bci) {
*method_id = _method_id;
*bci = _bci;
< prev index next >