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

Aleksey Shipilev shade at openjdk.java.net
Wed Mar 30 07:14:41 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

This pull request has now been integrated.

Changeset: 8b656117
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/8b656117dd1521ff23d6039eff7d13ef63a291c8
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8283789: CompilerPhaseTypeHelper::to_bitmask should operate on uint64_t

Reviewed-by: chagedorn, thartmann

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

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


More information about the hotspot-compiler-dev mailing list