RFR: 8333639: ubsan: cppVtables.cpp:81:55: runtime error: index 14 out of bounds for type 'long int [1]' [v4]

Martin Doerr mdoerr at openjdk.org
Mon Jun 17 10:37:13 UTC 2024


On Sat, 15 Jun 2024 18:24:28 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Factor out cloned_vtable_offs().
>
> src/hotspot/share/cds/cppVtables.cpp line 75:
> 
>> 73:     return 1 + vtable_size; // Need to add the space occupied by _vtable_size;
>> 74:   }
>> 75:   int vtable_size()           { return int(uintx(_vtable_size)); }
> 
> There's a bunch of pre-existing weirdness around the type of _vtable_size.  (I think _every_ use involves a
> conversion.)  Doing anything about that doesn't really belong in this change, but consider a followup cleanup.

Right. Please note that I usually don't touch code in this area. If you would like it to get improved, I suggest filing an RFE and discussing with the CDS folks. My intention is to get rid of UB which is terrible.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19623#discussion_r1642592095


More information about the hotspot-runtime-dev mailing list