RFR: 8341178: TypeRawPtr::add_offset may be "miscompiled" due to UB [v2]

Kim Barrett kbarrett at openjdk.org
Mon Oct 7 15:16:43 UTC 2024


On Mon, 7 Oct 2024 05:43:47 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> What about using `intptr_t` for `TypeRawPtr::_bits` instead?

That has more fannout, into code I'm not familiar with.  The proposed change fixes the immediate "miscompilation".
A change of the type could be done as a further enhancement, if that makes sense to do.  I'd rather leave that to
someone from the compiler team.  If that approach is what's wanted to fix the immediate problem, then I'm going
to want to hand this issue off.  Also, uintptr_t might be more appropriate than intptr_t.

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

PR Comment: https://git.openjdk.org/jdk/pull/21324#issuecomment-2397213908


More information about the hotspot-compiler-dev mailing list