RFR: 8347758: modules.cpp leaks string returned from get_numbered_property_as_sorted_string() [v2]
Zhengyu Gu
zgu at openjdk.org
Wed Jan 15 19:22:50 UTC 2025
On Wed, 15 Jan 2025 18:17:37 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Avoid copying strings
>
> src/hotspot/share/classfile/modules.cpp line 618:
>
>> 616:
>> 617: void Modules::serialize(SerializeClosure* soc) {
>> 618: ResourceMark rm;
>
> This is only needed for the `assert` in `check_archived_flag_consistency`.
I placed assert in wrong place :-(
> src/hotspot/share/classfile/modules.cpp line 673:
>
>> 671: if (soc->reading()) {
>> 672: const char* addmods_names = get_addmods_names_as_sorted_string();
>> 673: check_archived_flag_consistency(_archived_addmods_names, addmods_names, "jdk.module.addmods");
>
> Is this change necessary?
My bad, I thought I reverted.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23121#discussion_r1917220219
PR Review Comment: https://git.openjdk.org/jdk/pull/23121#discussion_r1917220777
More information about the hotspot-runtime-dev
mailing list