RFR: 8356865: C2: Unreasonable values for debug flag FastAllocateSizeLimit can lead to left-shift-overflow, which is UB [v3]

Benoît Maillard bmaillard at openjdk.org
Mon Jun 23 07:09:15 UTC 2025


On Mon, 23 Jun 2025 06:16:54 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8356865: Change assert
>
> test/hotspot/jtreg/compiler/arguments/TestFastAllocateSizeLimit.java line 48:
> 
>> 46:     public static void main(String[] args) throws IOException {
>> 47:         if (args.length == 0) {
>> 48:             int sizeLimit = RANDOM.nextInt(1 << 28);
> 
> Can you please add a quick comment why you chose `1 << 28`?

Done, thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25834#discussion_r2160871327


More information about the hotspot-dev mailing list