RFR: 8346916: [REDO] align_up has potential overflow
Casper Norrbin
cnorrbin at openjdk.org
Fri Feb 21 10:23:55 UTC 2025
On Fri, 21 Feb 2025 00:15:09 GMT, Dean Long <dlong at openjdk.org> wrote:
> Can you explain what was wrong with the original fix? The BACKOUT only mentions that tests failed, but doesn't say why. Also, I fail to see why align_up_or_min is an improvement. It seems to silently mask errors, and the callers are not checking the result. Having a size the overflows size_t seems like an error to me.
The original fix failed because of tests where overflow was the expected result. In the files changed here, it was either possible to recover from the overflow, or the caller does their own error checking. In both cases, the caller relied on the previous behaviour from `align_up`, and do check the result from `align_up_or_min`/`align_up_or_null`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23711#issuecomment-2674152486
More information about the hotspot-dev
mailing list