RFR: JDK-8254889: name_and_sig_as_C_string usages in frame coding without ResourceMark
Thomas Stuefe
stuefe at openjdk.java.net
Fri Oct 16 12:53:11 UTC 2020
On Fri, 16 Oct 2020 12:24:43 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> Hello, seems we have some usages of name_and_sig_as_C_string() in frame related HS coding without using a ResourceMark.
> Please review.
> Thanks, Matthias
Changes requested by stuefe (Reviewer).
src/hotspot/share/runtime/frame.cpp line 1145:
> 1143: #ifndef PRODUCT
> 1144: void frame::describe(FrameValues& values, int frame_no) {
> 1145: ResourceMark rm;
Not sure this works. RA allocated memory escapes the function in FrameValues::describe() (via FrameValue::description):
void FrameValues::describe(int owner, intptr_t* location, const char* description, int priority) {
FrameValue fv;
fv.location = location;
fv.owner = owner;
fv.priority = priority;
fv.description = NEW_RESOURCE_ARRAY(char, strlen(description) + 1);
strcpy(fv.description, description);
_values.append(fv);
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/698
More information about the hotspot-dev
mailing list