RFR: 8321685: Missing ResourceMark in code called from JvmtiEnvBase::get_vthread_jvf
Chris Plummer
cjplummer at openjdk.org
Wed Jan 10 02:37:23 UTC 2024
On Tue, 9 Jan 2024 23:48:35 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> This fix adds a ResourceMark missing in the `SetFramePopClosure::do_thread` and `SetFramePopClosure::do_vthread`.
>
> Testing:
> - TBD to submit tiers: 1-5
Looks good. Note, it would be good if the jvmti code added comments explaining why a ResourceMark is needed. For these two cases I had to search around until I stumbled across the following in some unrelated code:
// vframes are resource allocated
Thread* current_thread = Thread::current();
ResourceMark rm(current_thread);
This looks very much like the code you are updating, except the updated code is lacking the comment.
-------------
Marked as reviewed by cjplummer (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17332#pullrequestreview-1812314880
More information about the serviceability-dev
mailing list