RFR: 8338197: ubsan: ad_x86.hpp:6417:11: runtime error: shift exponent 100 is too large for 32-bit type 'unsigned int' [v2]
Vladimir Kozlov
kvn at openjdk.org
Fri Aug 22 22:46:50 UTC 2025
On Fri, 22 Aug 2025 22:31:19 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Good point - I removed the redundant code.
>>
>> As for `sizeof(_mask)`, shouldn’t it just be `max_shift = 31` or `_mask <<= (n < 32) ? n : 31;`?
>
> Yes, if `sizeof(uint)` is 32 bits on all our platforms.
>
> Hmm, may be we should use `uint32_t` for `_mask` here. Then we can use 32 and 31 without confusion.
I mean to use `_mask <<= (n < 32) ? n : 31;`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26890#discussion_r2294888148
More information about the hotspot-compiler-dev
mailing list