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

Internal Error occurs during offet conversion of byte code in rewrite/relocate

XMLWordPrintable

    • 12
    • x86
    • windows_2000
    • Verified

        A licensee reported the JVM ABENDs in 1.3.1_03(-server) with Internal Error,

        # ShouldNotReachHere()
        #
        # Error ID: 52454C4F4341544F520E43505001DB

        (This code means "src/share/vm/runtime/relocator.cpp, 475".)

        Although they can not send the test code, the licensee sent the following
        detail report.
        Their report also says this will occur in 1.4.X.(and tiger ?).
        So, I filed this issue.

        ==== Their investigation ====

        This reported issue occurs in Windows2000 and JDK1.3.1_03(-server).
        However, as the following report says, that might not depend on
        specific platform and JDK version.

        CRASH SCENARIO :

         This issue occurs at rewrite/relocate operation which is achieved at
         initializing process of byte code interpreter.
         According to our investigation, the source code and functions related to
         the rewrite/relocate process are as follows.
         
        - rewrite :
          - src/share/vm/oops/generateOopMap.cpp
             void GenerateOopMap::do_interpretation()
             void GenerateOopMap::rewrite_refval_conflicts()
             void GenerateOopMap::rewrite_refval_conflict()
             bool GenerateOopMap::rewrite_refval_conflict_inst()
             bool GenerateOopMap::rewrite_load_or_store()
             bool GenerateOopMap::expand_current_instr()
             
        - relocate:
          -src/share/vm/runtime/relocator.cpp
            methodHandle Relocator::insert_space_at()
            bool Relocator::handle_code_changes()
            bool ChangeJumpWiden::handle_code_change()
            void Relocator::change_jumps()
            void Relocator::change_jump()
            bool Relocator::handle_jump_widen()
         
        The rewrite operation broadens the index area of aload/astore op. code
        under some condition.(To insert wide op. code and expand the 1-byte area to
        2-bytes area)
        When this rewrite operation occurs, the relocate occurs at the same time
        in order to adjust the offset in byte-codes.
        The problem occurs during the change for the branch offset value of "if"
        code in relocate operation.

        Specifically speaking, the branch offset value of goto/jsr can take 65535
        as maximun(than's when goto_w/jsr_w is used).
        However, the offset of "if" op. code can take 32767(signed int 16 bits)
        as maximum value. If the length of byte code area becomes over 32767
        after the above rewrite operation, there might be the case when the program
        can not branch because of the offset short.

        When the conversion from signed 16 bit offset to signed 32 bit offset
        for each op. code like goto/jsr/if(ex. goto =>goto_w, jsr => jsr_w )
        is needed and the op. code is "if", this abnormal end occurs in
        Relocator::handle_jump_widen() as Internal error.

        === Their investigation End ======


        REQUEST:
         We need a workaround or fix.
         
         
        NOTE:
         According to the source code of 1.4.X(and 1.5 ?), the same issue occurs
         possibly.
         ===================================

              coleenp Coleen Phillimore
              tbaba Tadayuki Baba (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: