提交 b95d47b8 编写于 作者: K kvn

8035983: Fix "Native frames:" in crash report (hs_err file)

Summary: check fr.sender_sp() in java thread instead of os::is_first_C_frame(&fr).
Reviewed-by: twisti, coleenp
上级 4657da5f
...@@ -592,13 +592,24 @@ void VMError::report(outputStream* st) { ...@@ -592,13 +592,24 @@ void VMError::report(outputStream* st) {
st->cr(); st->cr();
// Compiled code may use EBP register on x86 so it looks like // Compiled code may use EBP register on x86 so it looks like
// non-walkable C frame. Use frame.sender() for java frames. // non-walkable C frame. Use frame.sender() for java frames.
if (_thread && _thread->is_Java_thread() && fr.is_java_frame()) { if (_thread && _thread->is_Java_thread()) {
RegisterMap map((JavaThread*)_thread, false); // No update // Catch very first native frame by using stack address.
fr = fr.sender(&map); // For JavaThread stack_base and stack_size should be set.
continue; if (!_thread->on_local_stack((address)(fr.sender_sp() + 1))) {
break;
}
if (fr.is_java_frame()) {
RegisterMap map((JavaThread*)_thread, false); // No update
fr = fr.sender(&map);
} else {
fr = os::get_sender_for_C_frame(&fr);
}
} else {
// is_first_C_frame() does only simple checks for frame pointer,
// it will pass if java compiled code has a pointer in EBP.
if (os::is_first_C_frame(&fr)) break;
fr = os::get_sender_for_C_frame(&fr);
} }
if (os::is_first_C_frame(&fr)) break;
fr = os::get_sender_for_C_frame(&fr);
} }
if (count > StackPrintLimit) { if (count > StackPrintLimit) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册