# HG changeset patch # User vlivanov # Date 1419036160 28800 # Node ID 3518158ff5d0d0ceb16bffd5f70d5b7f78154f0e # Parent c4fe49894a2284067f5e0fd7023e876f0d19c156 8067338: compiler/debug/TraceIterativeGVN.java segfaults Reviewed-by: kvn diff -r c4fe49894a22 -r 3518158ff5d0 hotspot/src/share/vm/opto/callnode.cpp --- a/hotspot/src/share/vm/opto/callnode.cpp Tue Dec 16 20:09:29 2014 +0100 +++ b/hotspot/src/share/vm/opto/callnode.cpp Fri Dec 19 16:42:40 2014 -0800 @@ -658,7 +658,7 @@ void CallNode::dump_spec(outputStream *st) const { st->print(" "); - tf()->dump_on(st); + if (tf() != NULL) tf()->dump_on(st); if (_cnt != COUNT_UNKNOWN) st->print(" C=%f",_cnt); if (jvms() != NULL) jvms()->dump_spec(st); } diff -r c4fe49894a22 -r 3518158ff5d0 hotspot/src/share/vm/opto/loopnode.cpp --- a/hotspot/src/share/vm/opto/loopnode.cpp Tue Dec 16 20:09:29 2014 +0100 +++ b/hotspot/src/share/vm/opto/loopnode.cpp Fri Dec 19 16:42:40 2014 -0800 @@ -1147,7 +1147,7 @@ // Dump special per-node info #ifndef PRODUCT void CountedLoopEndNode::dump_spec(outputStream *st) const { - if( in(TestValue)->is_Bool() ) { + if( in(TestValue) != NULL && in(TestValue)->is_Bool() ) { BoolTest bt( test_trip()); // Added this for g++. st->print("["); diff -r c4fe49894a22 -r 3518158ff5d0 hotspot/src/share/vm/opto/machnode.cpp --- a/hotspot/src/share/vm/opto/machnode.cpp Tue Dec 16 20:09:29 2014 +0100 +++ b/hotspot/src/share/vm/opto/machnode.cpp Fri Dec 19 16:42:40 2014 -0800 @@ -473,8 +473,13 @@ // Print any per-operand special info void MachNode::dump_spec(outputStream *st) const { uint cnt = num_opnds(); - for( uint i=0; idump_spec(st); + for( uint i=0; idump_spec(st); + } else { + st->print(" _"); + } + } const TypePtr *t = adr_type(); if( t ) { Compile* C = Compile::current(); @@ -493,7 +498,11 @@ //============================================================================= #ifndef PRODUCT void MachTypeNode::dump_spec(outputStream *st) const { - _bottom_type->dump_on(st); + if (_bottom_type != NULL) { + _bottom_type->dump_on(st); + } else { + st->print(" NULL"); + } } #endif @@ -635,7 +644,7 @@ #ifndef PRODUCT void MachCallNode::dump_spec(outputStream *st) const { st->print("# "); - tf()->dump_on(st); + if (tf() != NULL) tf()->dump_on(st); if (_cnt != COUNT_UNKNOWN) st->print(" C=%f",_cnt); if (jvms() != NULL) jvms()->dump_spec(st); } diff -r c4fe49894a22 -r 3518158ff5d0 hotspot/src/share/vm/opto/memnode.cpp --- a/hotspot/src/share/vm/opto/memnode.cpp Tue Dec 16 20:09:29 2014 +0100 +++ b/hotspot/src/share/vm/opto/memnode.cpp Fri Dec 19 16:42:40 2014 -0800 @@ -4370,7 +4370,7 @@ st->print(" {"); Node* base_mem = base_memory(); for( uint i = Compile::AliasIdxRaw; i < req(); i++ ) { - Node* mem = memory_at(i); + Node* mem = (in(i) != NULL) ? memory_at(i) : base_mem; if (mem == base_mem) { st->print(" -"); continue; } st->print( " N%d:", mem->_idx ); Compile::current()->get_adr_type(i)->dump_on(st);