# HG changeset patch # User kvn # Date 1372786249 25200 # Node ID 2b3fe74309b6f941637e62d1b29080f8222a24a4 # Parent a023ec3452c7c41dffe443179b8945b596e7cd09 8019247: SIGSEGV in compiled method c8e.e.t_.getArray(Ljava/lang/Class;)[Ljava/lang/Object Summary: Undo recent changes (and add more comments) in Ideal_allocation(). Reviewed-by: roland diff -r a023ec3452c7 -r 2b3fe74309b6 src/share/vm/opto/graphKit.cpp --- a/src/share/vm/opto/graphKit.cpp Mon Jul 01 14:14:16 2013 -0700 +++ b/src/share/vm/opto/graphKit.cpp Tue Jul 02 10:30:49 2013 -0700 @@ -3332,9 +3332,14 @@ if (ptr == NULL) { // reduce dumb test in callers return NULL; } - ptr = ptr->uncast(); // strip a raw-to-oop cast - if (ptr == NULL) return NULL; - + if (ptr->is_CheckCastPP()) { // strip only one raw-to-oop cast + ptr = ptr->in(1); + if (ptr == NULL) return NULL; + } + // Return NULL for allocations with several casts: + // j.l.reflect.Array.newInstance(jobject, jint) + // Object.clone() + // to keep more precise type from last cast. if (ptr->is_Proj()) { Node* allo = ptr->in(0); if (allo != NULL && allo->is_Allocate()) {