RFR: 8373447: Suspicious sign extension after integer promotion in imageDecompressor.cpp
Alan Bateman
alanb at openjdk.org
Fri Dec 19 06:33:54 UTC 2025
On Thu, 18 Dec 2025 18:01:03 GMT, Chen Liang <liach at openjdk.org> wrote:
> The bitwise manipulation code in ImageDecompressor::getU8 and getU4 utilizes implicit conversion to signed int for bitwise or, making this code confusing, especially when the most significant bytes are explicitly converted to unsigned long long, and unsigned long long takes part in a bitwise or with int. We should convert all u1 to u8/u4 before shifts to make the code easier to maintain and understand.
Looks okay. I assume you will run at least tier1-tier5 so check the various builds and configurations.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28903#pullrequestreview-3597088988
More information about the core-libs-dev
mailing list