Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
/ jdk22 Public archive

Commit

Permalink
8321685: Missing ResourceMark in code called from JvmtiEnvBase::get_v…
Browse files Browse the repository at this point in the history
…thread_jvf

Reviewed-by: amenkov
Backport-of: 2806adee2d8cca6bc215f285888631799bd02eac
  • Loading branch information
Serguei Spitsyn committed Jan 12, 2024
1 parent 07a8911 commit d3f18d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hotspot/share/prims/jvmtiEnvBase.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -2407,6 +2407,7 @@ UpdateForPopTopFrameClosure::doit(Thread *target, bool self) {
void
SetFramePopClosure::do_thread(Thread *target) {
Thread* current = Thread::current();
ResourceMark rm(current); // vframes are resource allocated
JavaThread* java_thread = JavaThread::cast(target);

if (java_thread->is_exiting()) {
Expand All @@ -2433,6 +2434,9 @@ SetFramePopClosure::do_thread(Thread *target) {

void
SetFramePopClosure::do_vthread(Handle target_h) {
Thread* current = Thread::current();
ResourceMark rm(current); // vframes are resource allocated

if (!_self && !JvmtiVTSuspender::is_vthread_suspended(target_h())) {
_result = JVMTI_ERROR_THREAD_NOT_SUSPENDED;
return;
Expand Down

1 comment on commit d3f18d0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.