Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-9

Use of memcpy() in copying portions of class file attribute structures

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • VM
    • None
    • All little-endian environments, but properly all environments

    Description

      Geir points out in SVN 312652 that,

      "I don't agree... things need to be byteswapped for indices and such"

      for copying the final portions of a (attribute_info) structure from the class file
      input buffer into the JVM runtime structure. He comments elsewhere about
      the need to byte swap one particular field, and added code to do this, but
      his observation here is directly relevant to all fields on a little-endian architecture.
      Sorry about that. I became so focused on the normative functionality for big-endian
      environments that I forgot about this issue while working on this area. The approach
      used in his implementation of the (ConstantValue_attribute) should be applied to
      all fields of all attributes, and the memcpy() below his comment needs to be undone
      in favor of this approach for all cases of all attributes. This is the more correct
      approach.

      Attachments

        Activity

          People

            dlydick Daniel Lydick
            bootjvm Bootstrap JVM (Daniel Lydick)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: