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

Runtime1::arraycopy_count_address uses wrong _oop_arraycopy_cnt variable

XMLWordPrintable

    • b20

      Runtime1::arraycopy_count_address uses Runtime1::_oop_arraycopy_cnt instead of the file static _oop_arraycopy_cnt variable.

      int Runtime1::_oop_arraycopy_cnt = 0;
      ...
      static int _byte_arraycopy_cnt = 0;
      static int _short_arraycopy_cnt = 0;
      static int _int_arraycopy_cnt = 0;
      static int _long_arraycopy_cnt = 0;
      static int _oop_arraycopy_cnt = 0;
      ...
      address Runtime1::arraycopy_count_address(BasicType type) {
        switch (type) {
        case T_BOOLEAN:
        case T_BYTE: return (address)&_byte_arraycopy_cnt;
        case T_CHAR:
        case T_SHORT: return (address)&_short_arraycopy_cnt;
        case T_FLOAT:
        case T_INT: return (address)&_int_arraycopy_cnt;
        case T_DOUBLE:
        case T_LONG: return (address)&_long_arraycopy_cnt;
        case T_ARRAY:
        case T_OBJECT: return (address)&_oop_arraycopy_cnt;
        default:
          ShouldNotReachHere();
          return NULL;
        }
      }

            thartmann Tobias Hartmann
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: