Integrated: 8358706: Integer overflow with -XX:MinOopMapAllocation=-1
Casper Norrbin
cnorrbin at openjdk.org
Wed Dec 3 10:06:36 UTC 2025
On Mon, 1 Dec 2025 14:00:22 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:
> Hi everyone,
>
> Passing a negative value to `-XX:MinOopMapAllocation` could trigger an integer overflow. This value is used as the initial size for the `OopMap` `GrowableArray` list inside `OopMapSet`. Negative inputs hits an assert when allocating for `GrowableArray`. Restricting this flag to positive values ensures we get a clear error message instead of a crash.
>
> Testing:
> - Oracle tier 1
> - Local tests with `-XX:MinOopMapAllocation=x`, covering both valid and invalid values.
This pull request has now been integrated.
Changeset: 94977063
Author: Casper Norrbin <cnorrbin at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/94977063baafc2e293193d284db408a069f12aca
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
8358706: Integer overflow with -XX:MinOopMapAllocation=-1
Reviewed-by: phubner, coleenp
-------------
PR: https://git.openjdk.org/jdk/pull/28576
More information about the hotspot-runtime-dev
mailing list