JDK-4684781 : ObjectStreamClass should use long sun.misc.Unsafe field offsets
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io:serialization
  • Affected Version: 1.4.1
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-05-14
  • Updated: 2002-11-04
  • Resolved: 2002-11-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Relates :  
Description
With the changes to sun.misc.Unsafe documented by bug 4679390 ("sun.misc.Unsafe
needs to bind to new JVM native methods") integrated, ObjectStreamClass
should be updated to use longs instead of ints to store field offsets, so as
to improve portability to 64-bit architectures.  This does not present
an immediate issue with Sun's own 64-bit JVM, since according to the
hotspot team, "truly long instance field offsets will never occur in any
forseeable simple variation the Hotspot JVM.  Heap objects are not so big as to
require 64 bits to distinguish their fields."  Such offsets may, however,
crop up in other vendors' implementations of the JVM, in which case
storing field offsets in variables of type long will improve portability.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b06
14-06-2004

SUGGESTED FIX Store field offsets in variables of type long instead of int.
11-06-2004

PUBLIC COMMENTS With the changes to sun.misc.Unsafe documented by bug 4679390 ("sun.misc.Unsafe needs to bind to new JVM native methods") integrated, ObjectStreamClass should be updated to use longs instead of ints to store field offsets, so as to improve portability to 64-bit architectures. This does not present an immediate issue with Sun's own 64-bit JVM, since according to the hotspot team, "truly long instance field offsets will never occur in any forseeable simple variation the Hotspot JVM. Heap objects are not so big as to require 64 bits to distinguish their fields." Such offsets may, however, crop up in other vendors' implementations of the JVM, in which case storing field offsets in variables of type long will improve portability.
10-06-2004

EVALUATION Yup. ###@###.### 2002-05-14
14-05-2002