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

Kim Barrett kbarrett at openjdk.org
Fri Oct 4 09:17:35 UTC 2024


On Fri, 4 Oct 2024 04:53:47 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> src/hotspot/share/opto/type.cpp line 3136:
>> 
>>> 3134: 
>>> 3135: const TypeRawPtr *TypeRawPtr::make( address bits ) {
>>> 3136:   assert( bits != nullptr, "Use TypePtr for null" );
>> 
>> Please, remove spaces after open and before close `()`.
>
> I'm not fond of those spaces, but they follow the style used throughout this file.

Although it looks like only 1/3 of the asserts in this file have extra whitespace, including the one being touched
here.  So sure, I can remove the extraneous whitespace from this function, since touching it anyway.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21324#discussion_r1787421941


More information about the hotspot-compiler-dev mailing list