Integrated: 8356865: C2: Unreasonable values for debug flag FastAllocateSizeLimit can lead to left-shift-overflow, which is UB
Benoît Maillard
bmaillard at openjdk.org
Mon Jun 23 07:54:37 UTC 2025
On Mon, 16 Jun 2025 14:50:46 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:
> This PR adds a range constraint for the `-XX:FastAllocateSizeLimit` debug flag. This prevents undefined behavior caused by left-shift overflow of the flag value in `GraphKit::new_array`.
>
> ### Testing
> - [x] [GitHub Actions](https://github.com/benoitmaillard/jdk/actions?query=branch%3AJDK-8356865)
> - [x] tier1-3, plus some internal testing
> - [x] Manual testing with values known to previously cause undefined behavior
>
> Thanks!
This pull request has now been integrated.
Changeset: c220b135
Author: Benoît Maillard <bmaillard at openjdk.org>
Committer: Emanuel Peter <epeter at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/c220b1358c91bce2eb7515e9f600004c7b975ee6
Stats: 64 lines in 3 files changed: 64 ins; 0 del; 0 mod
8356865: C2: Unreasonable values for debug flag FastAllocateSizeLimit can lead to left-shift-overflow, which is UB
Reviewed-by: epeter, mhaessig
-------------
PR: https://git.openjdk.org/jdk/pull/25834
More information about the hotspot-dev
mailing list