Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.1.0
-
Fix Version/s: 3.1.1
-
Component/s: Runtime: Object Model
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
It seems to me that 2 static fields could use a same slot if a 4 bytes static field is allocated after an 16 bytes static field if nextNumericSlot isn't 8 bytes aligned before the 16 bytes static field is allocated. See lines 324 to 332 of rvm/src/org/jikesrvm/runtime/Statics.java
It looks like a copy paste of the else code path (request for a 8 bytes static field allocation at line 346) occurs for commit 15244, which is perfectly correct in the else block as nextNumericSlot + 2 gives the slot with the higher id of the 3 slots reserved and leave the 2 slots with lower id .for use by the 8 bytes static field.
For me line 331 should be replaced by numericSlotHole = nextNumericSlot + 4;
Agreed.