RFR: 8347758: modules.cpp leaks string returned from get_numbered_property_as_sorted_string() [v4]
Calvin Cheung
ccheung at openjdk.org
Thu Jan 16 18:17:40 UTC 2025
On Thu, 16 Jan 2025 14:06:01 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> src/hotspot/share/classfile/modules.cpp line 644:
>>
>>> 642:
>>> 643: void Modules::serialize_native_access_flags(SerializeClosure* soc) {
>>> 644: ResourceMark rm;
>>
>> I would suggest moving this to the scope where it is needed.
>
> This is the scope where `ResourceMark` is needed. no?
I think what David meant is to declare `ResourceMark` inside the "if" block, right before calling `check_archived_flag_consistency()`. Similarly in `serialize_addmods_names()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23121#discussion_r1918993952
More information about the hotspot-runtime-dev
mailing list