Relates :
|
is_object_aligned only works correctly for sizes measured in words. When a pointer is passed into: inline bool is_object_aligned(intptr_t addr) { return addr == align_object_size(addr); } inline intptr_t align_object_size(intptr_t size) { return align_size_up(size, MinObjAlignment); } the pointer is incorrectly interpreted as a word size and the alignment is checked against MinObjectAligment instead of MinObjectAlignmentInBytes. This was found while working on JDK-8178489.