RFR: 8346916: [REDO] align_up has potential overflow [v2]
Casper Norrbin
cnorrbin at openjdk.org
Tue Mar 4 15:48:18 UTC 2025
On Tue, 4 Mar 2025 09:34:20 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> src/hotspot/share/cds/metaspaceShared.cpp line 244:
>>
>>> 242:
>>> 243: char* aligned_base = align_up_or_null(specified_base, alignment);
>>> 244: assert(is_aligned(aligned_base, alignment), "sanity");
>>
>> I don't think this assert adds anything.
>
> Actually, it's worse than that, since is_aligned of a null pointer is problematic.
Removed it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23711#discussion_r1979721861
More information about the hotspot-dev
mailing list