On Sat, 23 May 2026 22:12:58 GMT, John R Rose <[email protected]> wrote:

> Regarding that “one scenario left”: It is poking a bad byte into a Java heap 
> boolean, and then reading the boolean under the uniform assumption that 
> nobody pokes any bad bytes into Java heap booleans. There’s no way to recover 
> from such a poke, just as there’s no way to recover from poking a byte into 
> the middle of a managed pointer. 

There's a solution: unconditionally truncate boolean values on loads. Then, 
truncation on stores can be dropped. But it would introduce more overhead 
anyway, since loads are usually more common than stores. Also, folding boolean 
memory accesses into machine instructions won't work anymore.

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

PR Comment: https://git.openjdk.org/jdk/pull/31249#issuecomment-4548430946

Reply via email to