RFR: 8354428: [ubsan] g1BiasedArray.hpp: pointer overflow in address calculation [v3]

Thomas Schatzl tschatzl at openjdk.org
Tue May 27 09:25:38 UTC 2025


On Tue, 27 May 2025 08:58:52 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   * kbarrett review
>
> src/hotspot/share/gc/g1/g1BiasedArray.hpp line 107:
> 
>> 105:   T* base() const { return (T*)G1BiasedMappedArrayBase::_base; }
>> 106: 
>> 107:   T* biased_base_at(idx_t index) const { return (T*)(G1BiasedMappedArrayBase::_biased_base + index * sizeof(T)); }
> 
> [pre-existing] Here and elsewhere, I think `this->_biased_base` is the more usual idiom for accessing
> a member of a base class from a class template. The reason just `_biased_base` doesn't work has to
> do with the name lookup rules in templates. Your choice on this.

Used `this->`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25447#discussion_r2108690676


More information about the hotspot-gc-dev mailing list