RFR: 8283789: CompilerPhaseTypeHelper::to_bitmask should operate on uint64_t

Aleksey Shipilev shade at openjdk.java.net
Wed Mar 30 07:14:40 UTC 2022


On Mon, 28 Mar 2022 13:02:37 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> [JDK-8281505](https://bugs.openjdk.java.net/browse/JDK-8281505) added this helper method that operates on `uint64_t` masks, but it operates on `int`s. So it is subtly broken on 32-bit platforms, for example. SonarCloud complains about it: "The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'int'"
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug, `compiler/oracle` passes
>  - [x] Linux x86_32 fastdebug, `compiler/oracle` passes

Thanks!

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

PR: https://git.openjdk.java.net/jdk/pull/7994


More information about the hotspot-compiler-dev mailing list