Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/graphKit.cpp @ 20627:e7b3d177adda
8057622: java/util/stream/test/org/openjdk/tests/java/util/stream/InfiniteStreamWithLimitOpTest: SEGV inside compiled code (sparc)
Summary: In Parse::array_store_check(), add control edge FROM IfTrue branch of runtime type check of the destination array TO loading _element_klass from destination array.
Reviewed-by: kvn, roland, anoll
Contributed-by: Zoltan Majo <zoltan.majo@oracle.com>
author | zmajo |
---|---|
date | Mon, 10 Nov 2014 17:14:59 +0100 |
parents | 411e30e5fbb8 |
children | 7848fc12602b 6e8e0bf87bbe |
comparison
equal
deleted
inserted
replaced
20626:1a2069ede139 | 20627:e7b3d177adda |
---|---|
1148 Node* GraphKit::load_object_klass(Node* obj) { | 1148 Node* GraphKit::load_object_klass(Node* obj) { |
1149 // Special-case a fresh allocation to avoid building nodes: | 1149 // Special-case a fresh allocation to avoid building nodes: |
1150 Node* akls = AllocateNode::Ideal_klass(obj, &_gvn); | 1150 Node* akls = AllocateNode::Ideal_klass(obj, &_gvn); |
1151 if (akls != NULL) return akls; | 1151 if (akls != NULL) return akls; |
1152 Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes()); | 1152 Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes()); |
1153 return _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), k_adr, TypeInstPtr::KLASS) ); | 1153 return _gvn.transform(LoadKlassNode::make(_gvn, NULL, immutable_memory(), k_adr, TypeInstPtr::KLASS)); |
1154 } | 1154 } |
1155 | 1155 |
1156 //-------------------------load_array_length----------------------------------- | 1156 //-------------------------load_array_length----------------------------------- |
1157 Node* GraphKit::load_array_length(Node* array) { | 1157 Node* GraphKit::load_array_length(Node* array) { |
1158 // Special-case a fresh allocation to avoid building nodes: | 1158 // Special-case a fresh allocation to avoid building nodes: |
2540 Node *p2 = _gvn.transform( new (C) AddPNode(subklass,subklass,chk_off_X) ); | 2540 Node *p2 = _gvn.transform( new (C) AddPNode(subklass,subklass,chk_off_X) ); |
2541 // For some types like interfaces the following loadKlass is from a 1-word | 2541 // For some types like interfaces the following loadKlass is from a 1-word |
2542 // cache which is mutable so can't use immutable memory. Other | 2542 // cache which is mutable so can't use immutable memory. Other |
2543 // types load from the super-class display table which is immutable. | 2543 // types load from the super-class display table which is immutable. |
2544 Node *kmem = might_be_cache ? memory(p2) : immutable_memory(); | 2544 Node *kmem = might_be_cache ? memory(p2) : immutable_memory(); |
2545 Node *nkls = _gvn.transform( LoadKlassNode::make( _gvn, kmem, p2, _gvn.type(p2)->is_ptr(), TypeKlassPtr::OBJECT_OR_NULL ) ); | 2545 Node* nkls = _gvn.transform(LoadKlassNode::make(_gvn, NULL, kmem, p2, _gvn.type(p2)->is_ptr(), TypeKlassPtr::OBJECT_OR_NULL)); |
2546 | 2546 |
2547 // Compile speed common case: ARE a subtype and we canNOT fail | 2547 // Compile speed common case: ARE a subtype and we canNOT fail |
2548 if( superklass == nkls ) | 2548 if( superklass == nkls ) |
2549 return top(); // false path is dead; no test needed. | 2549 return top(); // false path is dead; no test needed. |
2550 | 2550 |