|
|
c3e128 |
|
|
|
c3e128 |
# HG changeset patch
|
|
|
c3e128 |
# User thartmann
|
|
|
c3e128 |
# Date 1604482955 -3600
|
|
|
c3e128 |
# Node ID 27723943c0dd65a191cbefe031cec001521e4b13
|
|
|
c3e128 |
# Parent e9d90c9daf895b469b461b727b6887e7780b4ac2
|
|
|
c3e128 |
8250861: Crash in MinINode::Ideal(PhaseGVN*, bool)
|
|
|
c3e128 |
Summary: Added missing NULL checks.
|
|
|
c3e128 |
Reviewed-by: kvn, chagedorn
|
|
|
c3e128 |
|
|
|
c3e128 |
diff -r e9d90c9daf89 -r 27723943c0dd src/hotspot/share/opto/addnode.cpp
|
|
|
c3e128 |
--- a/src/hotspot/share/opto/addnode.cpp Mon Nov 02 20:20:05 2020 +0100
|
|
|
c3e128 |
+++ b/src/hotspot/share/opto/addnode.cpp Wed Nov 04 10:42:35 2020 +0100
|
|
|
c3e128 |
@@ -917,7 +917,7 @@
|
|
|
c3e128 |
|
|
|
c3e128 |
// Transform MIN2(x + c0, MIN2(x + c1, z)) into MIN2(x + MIN2(c0, c1), z)
|
|
|
c3e128 |
// if x == y and the additions can't overflow.
|
|
|
c3e128 |
- if (phase->eqv(x,y) &&
|
|
|
c3e128 |
+ if (phase->eqv(x,y) && tx != NULL &&
|
|
|
c3e128 |
!can_overflow(tx, x_off) &&
|
|
|
c3e128 |
!can_overflow(tx, y_off)) {
|
|
|
c3e128 |
return new MinINode(phase->transform(new AddINode(x, phase->intcon(MIN2(x_off, y_off)))), r->in(2));
|
|
|
c3e128 |
@@ -925,7 +925,7 @@
|
|
|
c3e128 |
} else {
|
|
|
c3e128 |
// Transform MIN2(x + c0, y + c1) into x + MIN2(c0, c1)
|
|
|
c3e128 |
// if x == y and the additions can't overflow.
|
|
|
c3e128 |
- if (phase->eqv(x,y) &&
|
|
|
c3e128 |
+ if (phase->eqv(x,y) && tx != NULL &&
|
|
|
c3e128 |
!can_overflow(tx, x_off) &&
|
|
|
c3e128 |
!can_overflow(tx, y_off)) {
|
|
|
c3e128 |
return new AddINode(x,phase->intcon(MIN2(x_off,y_off)));
|
|
|
c3e128 |
|