Details
-
Bug
-
Resolution: Fixed
-
P4
-
11, 12, 13
-
b19
-
x86
-
linux
Description
Problem reported by fedor.burdun@azul.com:
I've found an inconsistency in CDS related Klass* reallocating code, in method
static void ArchiveCompactor::allocate(MetaspaceClosure::Ref* ref, bool read_only) (src/hotspot/share/memory/metaspaceShared.cpp:1122)
the alignment = BytesPerWord has been used, that is fine for 64bit platforms, but may cause problems on 32bit ones.
For example, in case of ARM gcc compiles accessors for u8/long long types using ldrd/strd instructions that requires a double-word alignment on ARMv5TE and older.
Moreover the method (although it used only for compressed oops)
inline bool check_klass_alignment(Klass* obj) in src/hotspot/share/oops/klass.inline.hpp
checks classes to be aligned to KlassAlignment const, not to the BytesPerWord one.
I've found an inconsistency in CDS related Klass* reallocating code, in method
static void ArchiveCompactor::allocate(MetaspaceClosure::Ref* ref, bool read_only) (src/hotspot/share/memory/metaspaceShared.cpp:1122)
the alignment = BytesPerWord has been used, that is fine for 64bit platforms, but may cause problems on 32bit ones.
For example, in case of ARM gcc compiles accessors for u8/long long types using ldrd/strd instructions that requires a double-word alignment on ARMv5TE and older.
Moreover the method (although it used only for compressed oops)
inline bool check_klass_alignment(Klass* obj) in src/hotspot/share/oops/klass.inline.hpp
checks classes to be aligned to KlassAlignment const, not to the BytesPerWord one.
Attachments
Issue Links
- relates to
-
JDK-8254606 x86_32: assert(all_ro_bytes == ro_all) failed: everything should have been counted
- Closed
-
JDK-8254125 Assertion in cppVtables.cpp during builds on 32bit Windows
- Resolved