RFR: 8358706: Integer overflow with -XX:MinOopMapAllocation=-1 [v2]
Casper Norrbin
cnorrbin at openjdk.org
Mon Dec 1 14:33:19 UTC 2025
> 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.
Casper Norrbin has updated the pull request incrementally with one additional commit since the last revision:
change flag type to int
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28576/files
- new: https://git.openjdk.org/jdk/pull/28576/files/6ded9479..a1555d99
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28576&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28576&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/28576.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28576/head:pull/28576
PR: https://git.openjdk.org/jdk/pull/28576
More information about the hotspot-runtime-dev
mailing list