Tue, 02 Jul 2013 10:30:49 -0700
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
src/share/vm/opto/graphKit.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/graphKit.cpp Mon Jul 01 14:14:16 2013 -0700 1.2 +++ b/src/share/vm/opto/graphKit.cpp Tue Jul 02 10:30:49 2013 -0700 1.3 @@ -3332,9 +3332,14 @@ 1.4 if (ptr == NULL) { // reduce dumb test in callers 1.5 return NULL; 1.6 } 1.7 - ptr = ptr->uncast(); // strip a raw-to-oop cast 1.8 - if (ptr == NULL) return NULL; 1.9 - 1.10 + if (ptr->is_CheckCastPP()) { // strip only one raw-to-oop cast 1.11 + ptr = ptr->in(1); 1.12 + if (ptr == NULL) return NULL; 1.13 + } 1.14 + // Return NULL for allocations with several casts: 1.15 + // j.l.reflect.Array.newInstance(jobject, jint) 1.16 + // Object.clone() 1.17 + // to keep more precise type from last cast. 1.18 if (ptr->is_Proj()) { 1.19 Node* allo = ptr->in(0); 1.20 if (allo != NULL && allo->is_Allocate()) {