RFR: 8339242: Fix overflow issues in AdlArena
Thomas Stuefe
stuefe at openjdk.org
Sat Aug 31 04:52:20 UTC 2024
On Thu, 29 Aug 2024 15:07:46 GMT, Casper Norrbin <duke at openjdk.org> wrote:
> Hi everyone,
>
> This PR addresses an issue in `adlArena` where some allocations lack checks for overflow. This could potentially result in successful allocations when called with unrealistic values.
>
> The fix includes:
>
> - Adding assertions to check for potential overflow.
> - Reordering some operations to guard against overflow.
If the aim is to increase security, would it not make more sense to test against hardcoded "reasonable max" values? Anything larger than a few MB is likely to be an error anyway, or?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20774#issuecomment-2322770725
More information about the hotspot-compiler-dev
mailing list