-
Bug
-
Resolution: Fixed
-
P4
-
15
-
b11
The VM option -XX:-UseEmptySlotsInSupers aims to produce the same kind of layout as the old field layout code by disabling some optimizations.
However, in some cases it fails to do so:
class TypeLI {
final long f;
final int f1;
}
produces the following layout:
Layout of class TypeLI
Instance fields:
@0 12/- RESERVED
@12 4/1 EMPTY
@16 "f" J 8/8 REGULAR
@24 "f1" I 4/4 REGULAR
Static fields:
@0 112/- RESERVED
Instance size = 32 bytes
but the expected field layout is:
Layout of class TypeLI
Instance fields:
@0 12/- RESERVED
@12 "f1" I 4/4 REGULAR
@16 "f" J 8/8 REGULAR
Static fields:
@0 104/- RESERVED
Instance size = 24 bytes
However, in some cases it fails to do so:
class TypeLI {
final long f;
final int f1;
}
produces the following layout:
Layout of class TypeLI
Instance fields:
@0 12/- RESERVED
@12 4/1 EMPTY
@16 "f" J 8/8 REGULAR
@24 "f1" I 4/4 REGULAR
Static fields:
@0 112/- RESERVED
Instance size = 32 bytes
but the expected field layout is:
Layout of class TypeLI
Instance fields:
@0 12/- RESERVED
@12 "f1" I 4/4 REGULAR
@16 "f" J 8/8 REGULAR
Static fields:
@0 104/- RESERVED
Instance size = 24 bytes
- relates to
-
JDK-8241500 FieldLayout/OldLayoutCheck.java fails in 32-bit VMs
- Resolved
-
JDK-8239873 [TESTBUG] FieldLayout/OldLayoutCheck.java fails after the fix for JDK-8239503
- Resolved
-
JDK-8239503 FieldLayout/OldLayoutCheck.java fails due to "RuntimeException: Misplaced int field: expected 24 to equal 12"
- Resolved