RFR: 8307315: Missing ResourceMark in CDS and JVMTI code [v2]
Calvin Cheung
ccheung at openjdk.org
Tue May 16 03:51:21 UTC 2023
On Tue, 16 May 2023 01:06:21 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add a comment
>
> src/hotspot/share/classfile/klassFactory.cpp line 57:
>
>> 55: assert(ik->is_shared(), "expecting a shared class");
>> 56: if (JvmtiExport::should_post_class_file_load_hook()) {
>> 57: // Caller needs a ResourceMark because parts of the returned cfs are resource-allocated.
>
> I think this comment should be placed in filemap.hpp above the declaration of `FileMapInfo::open_stream_for_jvmti()`. We use the same convention for other functions that needs the caller to create the ResourceMark.
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13992#discussion_r1194573808
More information about the hotspot-runtime-dev
mailing list