RFR: 8351040: [REDO] Protection zone for easier detection of accidental zero-nKlass use [v2]
Thomas Stuefe
stuefe at openjdk.org
Thu Mar 13 09:11:06 UTC 2025
On Wed, 12 Mar 2025 17:16:09 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>>
>> skip test if we have no COH archive
>
> src/hotspot/share/cds/metaspaceShared.cpp line 1431:
>
>> 1429: #ifdef _LP64
>> 1430: if (Metaspace::using_class_space()) {
>> 1431: assert(prot_zone_size > 0 &&
>
> This code assumes that `prot_zone_size > 0`, but we have other code that checks `if (prot_zone_size > 0)`. Should the "if" be changed to asserts?
(prot_zone_size > 0) holds true if we are using class space. The other occurrences are in paths that are also hit for non-class space. But here, we know we are using class space, since we are in a `if (Metaspace::using_class_space())` condition.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23912#discussion_r1993075045
More information about the hotspot-dev
mailing list