comparison src/share/vm/opto/doCall.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 331df100ad40
children 9e69e8d1c900
comparison
equal deleted inserted replaced
20626:1a2069ede139 20627:e7b3d177adda
789 789
790 // Get the exception oop klass from its header 790 // Get the exception oop klass from its header
791 Node* ex_klass_node = NULL; 791 Node* ex_klass_node = NULL;
792 if (has_ex_handler() && !ex_type->klass_is_exact()) { 792 if (has_ex_handler() && !ex_type->klass_is_exact()) {
793 Node* p = basic_plus_adr( ex_node, ex_node, oopDesc::klass_offset_in_bytes()); 793 Node* p = basic_plus_adr( ex_node, ex_node, oopDesc::klass_offset_in_bytes());
794 ex_klass_node = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); 794 ex_klass_node = _gvn.transform(LoadKlassNode::make(_gvn, NULL, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT));
795 795
796 // Compute the exception klass a little more cleverly. 796 // Compute the exception klass a little more cleverly.
797 // Obvious solution is to simple do a LoadKlass from the 'ex_node'. 797 // Obvious solution is to simple do a LoadKlass from the 'ex_node'.
798 // However, if the ex_node is a PhiNode, I'm going to do a LoadKlass for 798 // However, if the ex_node is a PhiNode, I'm going to do a LoadKlass for
799 // each arm of the Phi. If I know something clever about the exceptions 799 // each arm of the Phi. If I know something clever about the exceptions
807 // This path was not taken. 807 // This path was not taken.
808 ex_klass_node->init_req(i, top()); 808 ex_klass_node->init_req(i, top());
809 continue; 809 continue;
810 } 810 }
811 Node* p = basic_plus_adr(ex_in, ex_in, oopDesc::klass_offset_in_bytes()); 811 Node* p = basic_plus_adr(ex_in, ex_in, oopDesc::klass_offset_in_bytes());
812 Node* k = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); 812 Node* k = _gvn.transform(LoadKlassNode::make(_gvn, NULL, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT));
813 ex_klass_node->init_req( i, k ); 813 ex_klass_node->init_req( i, k );
814 } 814 }
815 _gvn.set_type(ex_klass_node, TypeKlassPtr::OBJECT); 815 _gvn.set_type(ex_klass_node, TypeKlassPtr::OBJECT);
816 816
817 } 817 }