Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8261262: Kitchensink24HStress.java crashed with EXCEPTION_ACCESS_VIOLATION #3010

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 7 additions & 10 deletions src/hotspot/share/prims/jvmtiEnvThreadState.cpp
Expand Up @@ -258,19 +258,16 @@ class GetCurrentLocationClosure : public HandshakeClosure {
JavaThread *jt = target->as_Java_thread();
ResourceMark rmark; // jt != Thread::current()
RegisterMap rm(jt, false);
// There can be a race condition between a VM_Operation reaching a safepoint
// There can be a race condition between a handshake
// and the target thread exiting from Java execution.
// We must recheck the last Java frame still exists.
// We must recheck that the last Java frame still exists.
if (!jt->is_exiting() && jt->has_last_Java_frame()) {
javaVFrame* vf = jt->last_java_vframe(&rm);
assert(vf != NULL, "must have last java frame");
robehn marked this conversation as resolved.
Show resolved Hide resolved
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;
if (vf != NULL) {
Method* method = vf->method();
_method_id = method->jmethod_id();
_bci = vf->bci();
}
}
_completed = true;
}
Expand Down