RFR: 8332697: ubsan: shenandoahSimpleBitMap.inline.hpp:68:23: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long int' [v4]

Y. Srinivas Ramakrishna ysr at openjdk.org
Wed Oct 2 21:03:36 UTC 2024


On Tue, 1 Oct 2024 21:44:48 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Use a template version of `right_n_bits` to use the same type for minuend and subtrahend.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Inline unnecessary usages of right_n_bits

src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.inline.hpp line 33:

> 31:   if (bit_number >= BitsPerWord) {
> 32:     return -1;
> 33:   }

When would we call here with `bit_number >= BitsPerWord` ? If never, may be we assert that?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21236#discussion_r1785246043


More information about the hotspot-gc-dev mailing list