RFR: 8353468: [ubsan] arguments.cpp:2422:23: runtime error: 2.14748e+11 is outside the range of representable values of type 'int' [v5]
David Holmes
dholmes at openjdk.org
Mon Sep 1 21:32:43 UTC 2025
On Mon, 1 Sep 2025 07:57:32 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> In converting values of `-XMinf` and `-XMaxf` options to `int`, overflow was not checked.
>> The values are checked against INT_MAX and clamped.
>>
>> Tests: tiers 1-5.
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>
> better messages
Changes requested by dholmes (Reviewer).
src/hotspot/share/runtime/arguments.cpp line 2429:
> 2427: if (MinHeapFreeRatio > (uintx)(dmaxf * 100)) {
> 2428: jio_fprintf(defaultStream::error_stream(),
> 2429: "-Xmaxf value (%s) must be greater than or equal to the implicit -Xmaxf value (%3.2lf)\n",
Suggestion:
"-Xmaxf value (%s) must be greater than or equal to the implicit -Xminf value (%3.2lf)\n",
-------------
PR Review: https://git.openjdk.org/jdk/pull/26859#pullrequestreview-3174502001
PR Review Comment: https://git.openjdk.org/jdk/pull/26859#discussion_r2314585180
More information about the hotspot-runtime-dev
mailing list