Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8228618

s390: c1/c2 fail to add a metadata relocation in the static call stub.

    XMLWordPrintable

Details

    • b32
    • s390x

    Backports

      Description

        The test vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine non-deterministically crashes the vm on s390.

        Analysis:

        - c1/c2 generates static call stub without metadata relocation for the instruction L that loads the target Method* T
          into Z_method.
          (see LIR_Assembler::emit_static_call_stub(), CompiledStaticCall::emit_to_interp_stub(), MacroAssembler::load_const_from_toc())

        - During call resolution the initialization of T in the metadata pool fails silently because no
          metadata relocation for L is found.
          Note that the load does not load from the metadata pool, but from the toc, which is accurately updated.
          (see CompiledDirectStaticCall::set_to_interpreted(), NativeMovConstReg::set_data(), relocInfo::update_oop_pool())

        - T is not marked 'on-stack' during class redefinition, because it is not found in the metadata pool of the caller
          (see MetadataOnStackMark, nmethod::metadata_do())

        - Metadata of T (e.g. constant pool) is reclaimed, because T was redefined.

        - static stub referencing T is executed and VM crashes

        Attachments

          Issue Links

            Activity

              People

                rrich Richard Reingruber
                rrich Richard Reingruber
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: