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

In Hotspot 2.0 for win32, i486.ad contains constant 12 instead arrayOopDesc::ba

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 2.0
    • hotspot
    • beta
    • x86
    • windows_nt



      Name: cl74495 Date: 07/26/2000


      In the hotspot-2_0-fcs-src-win-01_may_2000.zip sources,
      in file i486.ad
      in the implementation of enc_String_Compare(), there is a hardcoded
      value for the offset to the first element of a character array .

      The following fix should be applied

      cvs diff -r1.2 i486.ad
      2249,2252c2249,2252
      <
      < masm->movl(eax, Address(esi, value_offset));
      < masm->movl(ecx, Address(esi, offset_offset));
      < masm->leal(eax, Address(eax, ecx, Address::times_2, 12));
      ---
      > // Gemstone comments
      > masm->movl(eax, Address(esi, value_offset)); // (typeArrayOop)string.value into eax
      > masm->movl(ecx, Address(esi, offset_offset)); // (int) string.offset into ecx
      > masm->leal(eax, Address(eax, ecx, Address::times_2, arrayOopDesc::base_offset_in_bytes(T_CHAR)/*gemstone fix*/ )); // address of string.value[string.offset] into eax
      2255c2255
      < masm->leal(ebx, Address(ebx, ecx, Address::times_2, 12));
      ---
      > masm->leal(ebx, Address(ebx, ecx, Address::times_2, arrayOopDesc::base_offset_in_bytes(T_CHAR)/*gemstone fix*/ ));

      This is already fixed in the hotsparc-2_0-pre-fcs-b-src-sol-03_may_2000.zip sources
      (Review ID: 106977)
      ======================================================================

            azeemj Azeem Jiva
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: