1 Star 0 Fork 13

佛系少年中二/openjdk-21

forked from src-openEuler/openjdk-21 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Backport-JDK-8333622-ubsan-relocInfo_x86.cpp:101:56:.patch 1022 Bytes
一键复制 编辑 原始数据 按行查看 历史
wuyafang 提交于 2024-10-14 11:38 . sync bishengjdk21 patches
Subject: Backport of JDK-8333622 ubsan: relocInfo_x86.cpp:101:56: runtime error: pointer index expression with base (-1) overflowed
---
src/hotspot/cpu/x86/relocInfo_x86.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/cpu/x86/relocInfo_x86.cpp b/src/hotspot/cpu/x86/relocInfo_x86.cpp
index b382b0290..648c4d4b5 100644
--- a/src/hotspot/cpu/x86/relocInfo_x86.cpp
+++ b/src/hotspot/cpu/x86/relocInfo_x86.cpp
@@ -97,7 +97,11 @@ address Relocation::pd_call_destination(address orig_addr) {
if (ni->is_call()) {
return nativeCall_at(addr())->destination() + adj;
} else if (ni->is_jump()) {
- return nativeJump_at(addr())->jump_destination() + adj;
+ address dest = nativeJump_at(addr())->jump_destination();
+ if (dest == (address) -1) {
+ return addr(); // jump to self
+ }
+ return dest + adj;
} else if (ni->is_cond_jump()) {
return nativeGeneralJump_at(addr())->jump_destination() + adj;
} else if (ni->is_mov_literal64()) {
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Autistic_boyya/openjdk-21.git
[email protected]:Autistic_boyya/openjdk-21.git
Autistic_boyya
openjdk-21
openjdk-21
master

搜索帮助