1 Star 0 Fork 85

Ryan Peng/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
8250861-Crash-in-MinINode-Ideal-PhaseGVN-bool.patch 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
ow_wo 提交于 2020-11-10 22:23 +08:00 . add patches:
From 32271b8bfd2325ebb0d7fd338f3454be7dd1f998 Mon Sep 17 00:00:00 2001
Date: Fri, 30 Oct 2020 18:15:32 +0800
Subject: [PATCH] 8250861: Crash in MinINode::Ideal(PhaseGVN*, bool)
Summary: C2: Added missing NULL checks.
LLT: N/A
Bug url: https://bugs.openjdk.java.net/browse/JDK-8250861
---
hotspot/src/share/vm/opto/addnode.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hotspot/src/share/vm/opto/addnode.cpp b/hotspot/src/share/vm/opto/addnode.cpp
index 7bfa6e404..61b376e9b 100644
--- a/hotspot/src/share/vm/opto/addnode.cpp
+++ b/hotspot/src/share/vm/opto/addnode.cpp
@@ -921,7 +921,7 @@ Node *MinINode::Ideal(PhaseGVN *phase, bool can_reshape) {
// Transform MIN2(x + c0, MIN2(x + c1, z)) into MIN2(x + MIN2(c0, c1), z)
// if x == y and the additions can't overflow.
- if (phase->eqv(x,y) &&
+ if (phase->eqv(x,y) && tx != NULL &&
!can_overflow(tx, x_off) &&
!can_overflow(tx, y_off)) {
return new (phase->C) MinINode(phase->transform(new (phase->C) AddINode(x, phase->intcon(MIN2(x_off, y_off)))), r->in(2));
@@ -929,7 +929,7 @@ Node *MinINode::Ideal(PhaseGVN *phase, bool can_reshape) {
} else {
// Transform MIN2(x + c0, y + c1) into x + MIN2(c0, c1)
// if x == y and the additions can't overflow.
- if (phase->eqv(x,y) &&
+ if (phase->eqv(x,y) && tx != NULL &&
!can_overflow(tx, x_off) &&
!can_overflow(tx, y_off)) {
return new (phase->C) AddINode(x,phase->intcon(MIN2(x_off,y_off)));
--
2.12.3
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pengryan/openjdk-1.8.0.git
git@gitee.com:pengryan/openjdk-1.8.0.git
pengryan
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助