RFR: 8267908: linux: thread_native_entry can scribble on stack frame
Xin Liu
xliu at openjdk.java.net
Tue Jun 8 06:32:21 UTC 2021
On Tue, 8 Jun 2021 02:02:55 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Please review this trivial fix to ensure we do not try to alloca zero bytes.
>
> Thanks,
> David
I know. you patch LGTM. that is a side note.
I was worried about this statement was not portable if random is 1.
`*(char *)stackmem = 1;`
C++ std 6.5.3.4 says:
When sizeof is applied to an operand that has type char, unsigned char, or signed char, (or a qualified version thereof) the result is 1.
Therefore, it's portable.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4407
More information about the hotspot-runtime-dev
mailing list