mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8265150: AsyncGetCallTrace crashes on ResourceMark
Reviewed-by: dholmes, stuefe, eosterlund, sspitsyn
This commit is contained in:
parent
9642629d15
commit
267c024eb5
2 changed files with 6 additions and 9 deletions
|
@ -324,14 +324,11 @@ int Method::bci_from(address bcp) const {
|
||||||
if (is_native() && bcp == 0) {
|
if (is_native() && bcp == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#ifdef ASSERT
|
// Do not have a ResourceMark here because AsyncGetCallTrace stack walking code
|
||||||
{
|
// may call this after interrupting a nested ResourceMark.
|
||||||
ResourceMark rm;
|
|
||||||
assert(is_native() && bcp == code_base() || contains(bcp) || VMError::is_error_reported(),
|
assert(is_native() && bcp == code_base() || contains(bcp) || VMError::is_error_reported(),
|
||||||
"bcp doesn't belong to this method: bcp: " INTPTR_FORMAT ", method: %s",
|
"bcp doesn't belong to this method. bcp: " INTPTR_FORMAT, p2i(bcp));
|
||||||
p2i(bcp), name_and_sig_as_C_string());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return bcp - code_base();
|
return bcp - code_base();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -829,7 +829,7 @@ JvmtiEnvBase::get_stack_trace(JavaThread *java_thread,
|
||||||
"call by myself / at safepoint / at handshake");
|
"call by myself / at safepoint / at handshake");
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (java_thread->has_last_Java_frame()) {
|
if (java_thread->has_last_Java_frame()) {
|
||||||
RegisterMap reg_map(java_thread);
|
RegisterMap reg_map(java_thread, false /* update_map */, false /* process_frames */);
|
||||||
ResourceMark rm(current_thread);
|
ResourceMark rm(current_thread);
|
||||||
javaVFrame *jvf = java_thread->last_java_vframe(®_map);
|
javaVFrame *jvf = java_thread->last_java_vframe(®_map);
|
||||||
HandleMark hm(current_thread);
|
HandleMark hm(current_thread);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue