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

Tobias Hartmann thartmann at openjdk.org
Tue Oct 8 15:20:01 UTC 2024


On Mon, 7 Oct 2024 15:13:47 GMT, Kim Barrett <kbarrett 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.

Okay, that's fine with me.

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

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


More information about the hotspot-compiler-dev mailing list