RFR: 8256732: Zero: broken +ZeroTLAB exposes badly initialized memory
David Holmes
dholmes at openjdk.java.net
Tue Nov 24 01:43:00 UTC 2020
On Mon, 23 Nov 2020 08:08:27 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>
>
> > But isn't the memory returned by ThreadLocalAllocBuffer::allocate implicitly already zeroed when ZeroTLAB is specified?
>
> No! That tripped me too! The comment at `ThreadLocalAllocBuffer::allocate` actually says: `// Allocate size HeapWords. The memory is NOT initialized to zero.`
But is that comment true? Does it really mean "The memory is NOT initialized (unless ZeroTLAB has been set)" ?
If ZeroTLAB is not actually zeroing all memory returned via TLAB then something seems far more broken than just Zero!
-------------
PR: https://git.openjdk.java.net/jdk/pull/1343
More information about the hotspot-runtime-dev
mailing list