RFR: 8325870: Zap end padding bits for ArrayOops in non-release builds [v2]

Stefan Karlsson stefank at openjdk.org
Thu Feb 22 09:10:56 UTC 2024


On Wed, 21 Feb 2024 14:40:05 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> Make `ObjArrayAllocator` zap the end padding bits in not PRODUCT builds.
>> 
>> Issues like [JDK-8325074](https://bugs.openjdk.org/browse/JDK-8325074) / #17863 would then reproduce deterministically. Avoid future regressions.
>> 
>> Guarded `Copy::fill_to_bytes`, it was not clear if or how it handles `count == 0`. Given that almost all dispatch to memset, the `count == 0` would probably be alright, but as `obj_end - padding_in_bytes` may point beyond an object and thus outside the heap it seems prudent to guard it (I believe memset requires a valid pointer).
>
> Axel Boldt-Christmas has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - Update copyright years
>  - Use *_end pointers and add assert
>  - Rename heapPaddingByte to heapPaddingByteVal

Marked as reviewed by stefank (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/17864#pullrequestreview-1895298559


More information about the hotspot-gc-dev mailing list