Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
Dragonwell11
提交
4e146239
D
Dragonwell11
项目概览
LinuxSuRen
/
Dragonwell11
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4e146239
编写于
8月 21, 2019
作者:
N
ngasson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8209413: AArch64: NPE in clhsdb jstack command
Reviewed-by: aph
上级
e32b343d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
46 addition
and
33 deletion
+46
-33
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+5
-11
src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
+10
-8
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
+3
-3
src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
...spot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
+8
-5
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64CurrentFrameGuess.java
...jvm/hotspot/runtime/aarch64/AARCH64CurrentFrameGuess.java
+9
-3
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java
...classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java
+11
-3
未找到文件。
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
浏览文件 @
4e146239
/*
* Copyright (c) 1997, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
5
, Red Hat Inc. All rights reserved.
* Copyright (c) 1997, 201
9
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
9
, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -372,15 +372,9 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
Register
last_java_fp
,
address
last_java_pc
,
Register
scratch
)
{
if
(
last_java_pc
!=
NULL
)
{
adr
(
scratch
,
last_java_pc
);
}
else
{
// FIXME: This is almost never correct. We should delete all
// cases of set_last_Java_frame with last_java_pc=NULL and use the
// correct return address instead.
adr
(
scratch
,
pc
());
}
assert
(
last_java_pc
!=
NULL
,
"must provide a valid PC"
);
adr
(
scratch
,
last_java_pc
);
str
(
scratch
,
Address
(
rthread
,
JavaThread
::
frame_anchor_offset
()
+
JavaFrameAnchor
::
last_Java_pc_offset
()));
...
...
@@ -397,7 +391,7 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
}
else
{
InstructionMark
im
(
this
);
L
.
add_patch_at
(
code
(),
locator
());
set_last_Java_frame
(
last_java_sp
,
last_java_fp
,
(
address
)
NULL
,
scratch
);
set_last_Java_frame
(
last_java_sp
,
last_java_fp
,
pc
()
/* Patched later */
,
scratch
);
}
}
...
...
src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
浏览文件 @
4e146239
/*
* Copyright (c) 2003, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
8
, Red Hat Inc. All rights reserved.
* Copyright (c) 2003, 201
9
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
9
, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -1666,14 +1666,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
}
// Change state to native (we save the return address in the thread, since it might not
// be pushed on the stack when we do a a stack traversal). It is enough that the pc()
// points into the right code segment. It does not have to be the correct return pc.
// be pushed on the stack when we do a stack traversal).
// We use the same pc/oopMap repeatedly when we call out
intptr_t
the_pc
=
(
intptr_t
)
__
pc
();
oop_maps
->
add_gc_map
(
the_pc
-
start
,
map
);
__
set_last_Java_frame
(
sp
,
noreg
,
(
address
)
the_pc
,
rscratch1
);
Label
native_return
;
__
set_last_Java_frame
(
sp
,
noreg
,
native_return
,
rscratch1
);
Label
dtrace_method_entry
,
dtrace_method_entry_done
;
{
...
...
@@ -1804,6 +1801,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
return_type
);
}
__
bind
(
native_return
);
intptr_t
return_pc
=
(
intptr_t
)
__
pc
();
oop_maps
->
add_gc_map
(
return_pc
-
start
,
map
);
// Unpack native results.
switch
(
ret_type
)
{
case
T_BOOLEAN
:
__
c2bool
(
r0
);
break
;
...
...
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
浏览文件 @
4e146239
/*
* Copyright (c) 2003, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
5
, Red Hat Inc. All rights reserved.
* Copyright (c) 2003, 201
9
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
9
, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -4802,7 +4802,7 @@ class StubGenerator: public StubCodeGenerator {
// Set up last_Java_sp and last_Java_fp
address
the_pc
=
__
pc
();
__
set_last_Java_frame
(
sp
,
rfp
,
(
address
)
NULL
,
rscratch1
);
__
set_last_Java_frame
(
sp
,
rfp
,
the_pc
,
rscratch1
);
// Call runtime
if
(
arg1
!=
noreg
)
{
...
...
src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
浏览文件 @
4e146239
/*
* Copyright (c) 2003, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
8
, Red Hat Inc. All rights reserved.
* Copyright (c) 2003, 201
9
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 201
9
, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -1328,9 +1328,11 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// pass JNIEnv
__
add
(
c_rarg0
,
rthread
,
in_bytes
(
JavaThread
::
jni_environment_offset
()));
// It is enough that the pc() points into the right code
// segment. It does not have to be the correct return pc.
__
set_last_Java_frame
(
esp
,
rfp
,
(
address
)
NULL
,
rscratch1
);
// Set the last Java PC in the frame anchor to be the return address from
// the call to the native method: this will allow the debugger to
// generate an accurate stack trace.
Label
native_return
;
__
set_last_Java_frame
(
esp
,
rfp
,
native_return
,
rscratch1
);
// change thread state
#ifdef ASSERT
...
...
@@ -1351,6 +1353,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// Call the native method.
__
blr
(
r10
);
__
bind
(
native_return
);
__
maybe_isb
();
__
get_method
(
rmethod
);
// result potentially in r0 or v0
...
...
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64CurrentFrameGuess.java
浏览文件 @
4e146239
/*
* Copyright (c) 2003, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, Red Hat Inc.
* Copyright (c) 2003, 20
19
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015,
2019,
Red Hat Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -223,7 +223,13 @@ public class AARCH64CurrentFrameGuess {
}
}
setValues
(
sp
,
fp
,
null
);
// We found a PC in the frame anchor. Check that it's plausible, and
// if it is, use it.
if
(
vm
.
isJavaPCDbg
(
pc
))
{
setValues
(
sp
,
fp
,
pc
);
}
else
{
setValues
(
sp
,
fp
,
null
);
}
return
true
;
}
...
...
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java
浏览文件 @
4e146239
/*
* Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, Red Hat Inc.
* Copyright (c) 2001, 201
9
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015,
2019,
Red Hat Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -136,7 +136,15 @@ public class AARCH64Frame extends Frame {
this
.
raw_sp
=
raw_sp
;
this
.
raw_unextendedSP
=
raw_sp
;
this
.
raw_fp
=
raw_fp
;
this
.
pc
=
raw_sp
.
getAddressAt
(-
1
*
VM
.
getVM
().
getAddressSize
());
// We cannot assume SP[-1] always contains a valid return PC (e.g. if
// the callee is a C/C++ compiled frame). If the PC is not known to
// Java then this.pc is null.
Address
savedPC
=
raw_sp
.
getAddressAt
(-
1
*
VM
.
getVM
().
getAddressSize
());
if
(
VM
.
getVM
().
isJavaPCDbg
(
savedPC
))
{
this
.
pc
=
savedPC
;
}
adjustUnextendedSP
();
// Frame must be fully constructed before this call
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录