Print this page
rev 6883 : 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>

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/share/vm/opto/parse1.cpp
          +++ new/hotspot/src/share/vm/opto/parse1.cpp
↓ open down ↓ 1950 lines elided ↑ open up ↑
1951 1951        // No finalizable subclasses so skip the dynamic check.
1952 1952        C->dependencies()->assert_has_no_finalizable_subclasses(ik);
1953 1953        return;
1954 1954      }
1955 1955    }
1956 1956  
1957 1957    // Insert a dynamic test for whether the instance needs
1958 1958    // finalization.  In general this will fold up since the concrete
1959 1959    // class is often visible so the access flags are constant.
1960 1960    Node* klass_addr = basic_plus_adr( receiver, receiver, oopDesc::klass_offset_in_bytes() );
1961      -  Node* klass = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), klass_addr, TypeInstPtr::KLASS) );
     1961 +  Node* klass = _gvn.transform(LoadKlassNode::make(_gvn, NULL, immutable_memory(), klass_addr, TypeInstPtr::KLASS));
1962 1962  
1963 1963    Node* access_flags_addr = basic_plus_adr(klass, klass, in_bytes(Klass::access_flags_offset()));
1964 1964    Node* access_flags = make_load(NULL, access_flags_addr, TypeInt::INT, T_INT, MemNode::unordered);
1965 1965  
1966 1966    Node* mask  = _gvn.transform(new (C) AndINode(access_flags, intcon(JVM_ACC_HAS_FINALIZER)));
1967 1967    Node* check = _gvn.transform(new (C) CmpINode(mask, intcon(0)));
1968 1968    Node* test  = _gvn.transform(new (C) BoolNode(check, BoolTest::ne));
1969 1969  
1970 1970    IfNode* iff = create_and_map_if(control(), test, PROB_MAX, COUNT_UNKNOWN);
1971 1971  
↓ open down ↓ 295 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX