From 1113d94f23ad83a52583760dc5925bf119f04fa5 Mon Sep 17 00:00:00 2001 From: kvn Date: Tue, 11 Mar 2008 11:04:40 -0700 Subject: [PATCH] 6623167: C2 crashed in StoreCMNode::Value Summary: C2 crashed in StoreCMNode::Value because n->in(MemNode::OopStore) is 0. Reviewed-by: rasbold, never --- src/share/vm/opto/memnode.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/share/vm/opto/memnode.cpp b/src/share/vm/opto/memnode.cpp index 03f43d885..2cfa4281c 100644 --- a/src/share/vm/opto/memnode.cpp +++ b/src/share/vm/opto/memnode.cpp @@ -1771,9 +1771,16 @@ Node *StoreCMNode::Identity( PhaseTransform *phase ) { //------------------------------Value----------------------------------------- const Type *StoreCMNode::Value( PhaseTransform *phase ) const { + // Either input is TOP ==> the result is TOP + const Type *t = phase->type( in(MemNode::Memory) ); + if( t == Type::TOP ) return Type::TOP; + t = phase->type( in(MemNode::Address) ); + if( t == Type::TOP ) return Type::TOP; + t = phase->type( in(MemNode::ValueIn) ); + if( t == Type::TOP ) return Type::TOP; // If extra input is TOP ==> the result is TOP - const Type *t1 = phase->type( in(MemNode::OopStore) ); - if( t1 == Type::TOP ) return Type::TOP; + t = phase->type( in(MemNode::OopStore) ); + if( t == Type::TOP ) return Type::TOP; return StoreNode::Value( phase ); } -- GitLab