aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm
diff options
context:
space:
mode:
authorkvn <none@none>2013-07-02 10:30:49 -0700
committerkvn <none@none>2013-07-02 10:30:49 -0700
commitd01ab60812ce3e13090ea969f8b80ca9b20eeab8 (patch)
tree28ce2c8acca656ee9a40813033c2c5177e65844d /src/share/vm
parent0a9f443908574f9c4373afda11ddb97d8bd83b27 (diff)
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
Diffstat (limited to 'src/share/vm')
-rw-r--r--src/share/vm/opto/graphKit.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp
index 590770b7c..a363b11a5 100644
--- a/src/share/vm/opto/graphKit.cpp
+++ b/src/share/vm/opto/graphKit.cpp
@@ -3332,9 +3332,14 @@ AllocateNode* AllocateNode::Ideal_allocation(Node* ptr, PhaseTransform* phase) {
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()) {