Thu, 06 Aug 2020 08:10:56 +0200
8250861: Crash in MinINode::Ideal(PhaseGVN*, bool)
Summary: Added missing NULL checks.
Reviewed-by: kvn, chagedorn
src/share/vm/opto/addnode.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/addnode.cpp Wed Nov 04 21:53:14 2020 +0000 1.2 +++ b/src/share/vm/opto/addnode.cpp Thu Aug 06 08:10:56 2020 +0200 1.3 @@ -918,7 +918,7 @@ 1.4 1.5 // Transform MIN2(x + c0, MIN2(x + c1, z)) into MIN2(x + MIN2(c0, c1), z) 1.6 // if x == y and the additions can't overflow. 1.7 - if (phase->eqv(x,y) && 1.8 + if (phase->eqv(x,y) && tx != NULL && 1.9 !can_overflow(tx, x_off) && 1.10 !can_overflow(tx, y_off)) { 1.11 return new (phase->C) MinINode(phase->transform(new (phase->C) AddINode(x, phase->intcon(MIN2(x_off, y_off)))), r->in(2)); 1.12 @@ -926,7 +926,7 @@ 1.13 } else { 1.14 // Transform MIN2(x + c0, y + c1) into x + MIN2(c0, c1) 1.15 // if x == y and the additions can't overflow. 1.16 - if (phase->eqv(x,y) && 1.17 + if (phase->eqv(x,y) && tx != NULL && 1.18 !can_overflow(tx, x_off) && 1.19 !can_overflow(tx, y_off)) { 1.20 return new (phase->C) AddINode(x,phase->intcon(MIN2(x_off,y_off)));