RFR: 8308975: Fix signed integer overflow in compiler code, part 2 [v2]

Dean Long dlong at openjdk.org
Wed May 31 00:23:04 UTC 2023


On Tue, 30 May 2023 20:54:28 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Dean Long has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - use uint64_t for nanos
>>  - fix alignment
>
> src/hotspot/share/opto/type.cpp line 2279:
> 
>> 2277:   for( uint i=0; i<_cnt; i++ )
>> 2278:     sum += (uintptr_t)_fields[i];     // Hash on pointers directly
>> 2279:   return sum;
> 
> This looks like it's going to get a -Wconversion warning if we had them on - I think "sum" needs to be cast to uint.

You're right.  Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14188#discussion_r1210959379


More information about the hotspot-dev mailing list