RFR: 8365163: [ubsan] left-shift issue in globalDefinitions.hpp [v6]

Coleen Phillimore coleenp at openjdk.org
Wed Aug 27 16:13:43 UTC 2025


On Wed, 27 Aug 2025 15:48:27 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> test/hotspot/gtest/utilities/test_globalDefinitions.cpp line 306:
>> 
>>> 304:   EXPECT_EQ(val, CONST64(0x00000000000000FF));
>>> 305: 
>>> 306:   val = jlong_from(0xFFFFFFFF, 0);
>> 
>> Note that this passes the unsigned int value of 0xFFFFFFFF when the expected type is signed int (jint). If you run with -Wsign-conversion I think you will get a warning. Do we care about that here?
>
> I hope we will eventually. I'm fine with deferring that to then though, assuming that day ever comes.

It'd be nice not to have a (another?) -Wsign-conversion error in the file that every file includes though :(

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26809#discussion_r2304519374


More information about the hotspot-dev mailing list