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

Array type descriptor may have more than 255 dimensions

    XMLWordPrintable

    Details

    • Subcomponent:
      vm
    • Resolved In Build:
      1.6
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description



      Name: vrR10176 Date: 08/13/2003



      JVMS-2 has the assertions about array dimensions:

      "4.10 Limitations of the Java Virtual Machine
      ...
      The number of dimensions in an array is limited to 255 by the size of
      the dimensions opcode of the multianewarray instruction and by the
      constraints imposed on the multianewarray, anewarray, and newarray
      instructions by ?4.8.2.
      ..."

      and

      "4.4.1 The CONSTANT_Class_info Structure
      ...
      An array type descriptor is valid only if it represents 255 or fewer dimensions."
      It looks like the last assertion is applied to the chapter 4.4.1 only.

      But the chapters:
       2.7.5 Fully Qualified Names
       4.2 The Internal Form of Fully Qualified Class and Interface Names
       4.3 Descriptors (4.3.2 Field Descriptors and 4.3.3 Method Descriptors)
      say nothing about a number of dimensions limitation.

      Further, the following chapters:
       4.4.6 The CONSTANT_NameAndType_info Structure
       4.5 Fields
       4.6 Methods
      refer to definitions of field descriptors and method descriptors
      (descriptor_index) and also say nothing about a dimensions limitation.

      So according to JVMS-2 the descriptor_index of CONSTANT_NameAndType_info,
      field_info or method_info structures may refer to field descriptor representing
      more than 255 dimensions or method descriptor with similar ParameterDescriptor
      or ReturnDescriptor.

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abuckley Alex Buckley
              Reporter:
              rslasunw Rsla Rsla (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: