United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6633953 type2aelembytes[T_ADDRESS] should be 8 bytes in 64 bit VM
6633953 : type2aelembytes[T_ADDRESS] should be 8 bytes in 64 bit VM

Details
Type:
Bug
Submit Date:
2007-11-26
Status:
Closed
Updated Date:
2011-04-20
Project Name:
JDK
Resolved Date:
2011-04-20
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs12

Related Reports
Backport:
Backport:

Sub Tasks

Description
In globalDefinitions.cpp from the first day T_ADDRESS size is defined as 'int' size:

int type2aelembytes[T_CONFLICT+1] = {
...
  T_OBJECT_aelem_bytes,   // T_OBJECT   = 12,
  T_ARRAY_aelem_bytes,    // T_ARRAY    = 13,
  0,                      // T_VOID     = 14,
  T_INT_aelem_bytes,      // T_ADDRESS  = 15,   
  0                       // T_CONFLICT = 16,
};

I think, this is because T_OBJECT_aelem_bytes was also 4 when it was created.
T_OBJECT and T_ARRAY sizes were fixed when VM was changed to support 64 bits oops.

The incorrect T_ADDRESS size in 64-bits VM produces whong size of StoreP nodes
attached to Initialize:

  virtual int memory_size() const { return type2aelembytes[memory_type()]; }

As result EA can't find stores through Initialize node.
The current code which use InitializeNode::find_captured_store() may also be broken. 
I think, it works now because LoadP and StoreP has the same T_ADDRESS type.

                                    

Comments
SUGGESTED FIX

Fix T_ADDRESS size in type2aelembytes:

int type2aelembytes[T_CONFLICT+1] = {
...
  T_OBJECT_aelem_bytes,   // T_OBJECT   = 12,
  T_ARRAY_aelem_bytes,    // T_ARRAY    = 13,
  0,                      // T_VOID     = 14,
  T_OBJECT_aelem_bytes,   // T_ADDRESS  = 15,
                                     
2007-11-26
EVALUATION

See Description.
                                     
2007-11-26



Hardware and Software, Engineered to Work Together