提交 4f0a93f4 编写于 作者: K kvn

6840775: Multiple JVM crashes seen with 1.6.0_10 through 1.6.0_14

Summary: Put missed reference to allocated array in copyOf() intrinsic into OopMap for the call slow_arraycopy().
Reviewed-by: never
上级 541b3020
...@@ -161,6 +161,8 @@ public class OopTreeNodeAdapter extends FieldTreeNodeAdapter { ...@@ -161,6 +161,8 @@ public class OopTreeNodeAdapter extends FieldTreeNodeAdapter {
child = new OopTreeNodeAdapter(field.getValue(getObj()), field.getID(), getTreeTableMode()); child = new OopTreeNodeAdapter(field.getValue(getObj()), field.getID(), getTreeTableMode());
} catch (AddressException e) { } catch (AddressException e) {
child = new BadOopTreeNodeAdapter(field.getValueAsOopHandle(getObj()), field.getID(), getTreeTableMode()); child = new BadOopTreeNodeAdapter(field.getValueAsOopHandle(getObj()), field.getID(), getTreeTableMode());
} catch (UnknownOopException e) {
child = new BadOopTreeNodeAdapter(field.getValueAsOopHandle(getObj()), field.getID(), getTreeTableMode());
} }
} }
++curField; ++curField;
......
...@@ -41,7 +41,7 @@ ifeq ($(COMPILER_REV_NUMERIC),509) ...@@ -41,7 +41,7 @@ ifeq ($(COMPILER_REV_NUMERIC),509)
endif endif
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12) # Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
ifeq ($(COMPILER_REV_NUMERIC),508)) ifeq ($(COMPILER_REV_NUMERIC),508)
OPT_CFLAGS/ciTypeFlow.o = $(OPT_CFLAGS/O2) OPT_CFLAGS/ciTypeFlow.o = $(OPT_CFLAGS/O2)
endif # COMPILER_REV_NUMERIC == 508 endif # COMPILER_REV_NUMERIC == 508
......
...@@ -357,6 +357,9 @@ PhaseCFG::PhaseCFG( Arena *a, RootNode *r, Matcher &m ) : ...@@ -357,6 +357,9 @@ PhaseCFG::PhaseCFG( Arena *a, RootNode *r, Matcher &m ) :
#ifndef PRODUCT #ifndef PRODUCT
, _trace_opto_pipelining(TraceOptoPipelining || C->method_has_option("TraceOptoPipelining")) , _trace_opto_pipelining(TraceOptoPipelining || C->method_has_option("TraceOptoPipelining"))
#endif #endif
#ifdef ASSERT
, _raw_oops(a)
#endif
{ {
ResourceMark rm; ResourceMark rm;
// I'll need a few machine-specific GotoNodes. Make an Ideal GotoNode, // I'll need a few machine-specific GotoNodes. Make an Ideal GotoNode,
......
...@@ -380,6 +380,10 @@ class PhaseCFG : public Phase { ...@@ -380,6 +380,10 @@ class PhaseCFG : public Phase {
bool _trace_opto_pipelining; // tracing flag bool _trace_opto_pipelining; // tracing flag
#endif #endif
#ifdef ASSERT
Unique_Node_List _raw_oops;
#endif
// Build dominators // Build dominators
void Dominators(); void Dominators();
......
...@@ -74,9 +74,11 @@ struct OopFlow : public ResourceObj { ...@@ -74,9 +74,11 @@ struct OopFlow : public ResourceObj {
// this block. // this block.
Block *_b; // Block for this struct Block *_b; // Block for this struct
OopFlow *_next; // Next free OopFlow OopFlow *_next; // Next free OopFlow
// or NULL if dead/conflict
Compile* C;
OopFlow( short *callees, Node **defs ) : _callees(callees), _defs(defs), OopFlow( short *callees, Node **defs, Compile* c ) : _callees(callees), _defs(defs),
_b(NULL), _next(NULL) { } _b(NULL), _next(NULL), C(c) { }
// Given reaching-defs for this block start, compute it for this block end // Given reaching-defs for this block start, compute it for this block end
void compute_reach( PhaseRegAlloc *regalloc, int max_reg, Dict *safehash ); void compute_reach( PhaseRegAlloc *regalloc, int max_reg, Dict *safehash );
...@@ -88,7 +90,7 @@ struct OopFlow : public ResourceObj { ...@@ -88,7 +90,7 @@ struct OopFlow : public ResourceObj {
void clone( OopFlow *flow, int max_size); void clone( OopFlow *flow, int max_size);
// Make a new OopFlow from scratch // Make a new OopFlow from scratch
static OopFlow *make( Arena *A, int max_size ); static OopFlow *make( Arena *A, int max_size, Compile* C );
// Build an oopmap from the current flow info // Build an oopmap from the current flow info
OopMap *build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, int* live ); OopMap *build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, int* live );
...@@ -180,11 +182,11 @@ void OopFlow::clone( OopFlow *flow, int max_size ) { ...@@ -180,11 +182,11 @@ void OopFlow::clone( OopFlow *flow, int max_size ) {
} }
//------------------------------make------------------------------------------- //------------------------------make-------------------------------------------
OopFlow *OopFlow::make( Arena *A, int max_size ) { OopFlow *OopFlow::make( Arena *A, int max_size, Compile* C ) {
short *callees = NEW_ARENA_ARRAY(A,short,max_size+1); short *callees = NEW_ARENA_ARRAY(A,short,max_size+1);
Node **defs = NEW_ARENA_ARRAY(A,Node*,max_size+1); Node **defs = NEW_ARENA_ARRAY(A,Node*,max_size+1);
debug_only( memset(defs,0,(max_size+1)*sizeof(Node*)) ); debug_only( memset(defs,0,(max_size+1)*sizeof(Node*)) );
OopFlow *flow = new (A) OopFlow(callees+1, defs+1); OopFlow *flow = new (A) OopFlow(callees+1, defs+1, C);
assert( &flow->_callees[OptoReg::Bad] == callees, "Ok to index at OptoReg::Bad" ); assert( &flow->_callees[OptoReg::Bad] == callees, "Ok to index at OptoReg::Bad" );
assert( &flow->_defs [OptoReg::Bad] == defs , "Ok to index at OptoReg::Bad" ); assert( &flow->_defs [OptoReg::Bad] == defs , "Ok to index at OptoReg::Bad" );
return flow; return flow;
...@@ -347,6 +349,13 @@ OopMap *OopFlow::build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, i ...@@ -347,6 +349,13 @@ OopMap *OopFlow::build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, i
} else { } else {
// Other - some reaching non-oop value // Other - some reaching non-oop value
omap->set_value( r); omap->set_value( r);
#ifdef ASSERT
if( t->isa_rawptr() && C->cfg()->_raw_oops.member(def) ) {
def->dump();
n->dump();
assert(false, "there should be a oop in OopMap instead of a live raw oop at safepoint");
}
#endif
} }
} }
...@@ -562,7 +571,7 @@ void Compile::BuildOopMaps() { ...@@ -562,7 +571,7 @@ void Compile::BuildOopMaps() {
// Do the first block 'by hand' to prime the worklist // Do the first block 'by hand' to prime the worklist
Block *entry = _cfg->_blocks[1]; Block *entry = _cfg->_blocks[1];
OopFlow *rootflow = OopFlow::make(A,max_reg); OopFlow *rootflow = OopFlow::make(A,max_reg,this);
// Initialize to 'bottom' (not 'top') // Initialize to 'bottom' (not 'top')
memset( rootflow->_callees, OptoReg::Bad, max_reg*sizeof(short) ); memset( rootflow->_callees, OptoReg::Bad, max_reg*sizeof(short) );
memset( rootflow->_defs , 0, max_reg*sizeof(Node*) ); memset( rootflow->_defs , 0, max_reg*sizeof(Node*) );
...@@ -628,7 +637,7 @@ void Compile::BuildOopMaps() { ...@@ -628,7 +637,7 @@ void Compile::BuildOopMaps() {
// Carry it forward. // Carry it forward.
} else { // Draw a new OopFlow from the freelist } else { // Draw a new OopFlow from the freelist
if( !free_list ) if( !free_list )
free_list = OopFlow::make(A,max_reg); free_list = OopFlow::make(A,max_reg,C);
flow = free_list; flow = free_list;
assert( flow->_b == NULL, "oopFlow is not free" ); assert( flow->_b == NULL, "oopFlow is not free" );
free_list = flow->_next; free_list = flow->_next;
......
...@@ -1130,6 +1130,9 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_List &stack) { ...@@ -1130,6 +1130,9 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_List &stack) {
Node *def = self->in(1); Node *def = self->in(1);
if (def != NULL && def->bottom_type()->base() == Type::RawPtr) { if (def != NULL && def->bottom_type()->base() == Type::RawPtr) {
early->add_inst(self); early->add_inst(self);
#ifdef ASSERT
_raw_oops.push(def);
#endif
continue; continue;
} }
break; break;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册