Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
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.