Skip to content

Commit

Permalink
8273639: tests fail with "assert(_handle_mark_nesting > 1) failed: me…
Browse files Browse the repository at this point in the history
…mory leak: allocating handle outside HandleMark"

Reviewed-by: coleenp, dholmes
  • Loading branch information
pliden committed Sep 14, 2021
1 parent 1d2458d commit f527289
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hotspot/share/services/heapDumper.cpp
Expand Up @@ -1862,7 +1862,10 @@ void VM_HeapDumper::dump_stack_traces() {
oop threadObj = thread->threadObj();
if (threadObj != NULL && !thread->is_exiting() && !thread->is_hidden_from_external_view()) {
// dump thread stack trace
ResourceMark rm;
Thread* current_thread = Thread::current();
ResourceMark rm(current_thread);
HandleMark hm(current_thread);

ThreadStackTrace* stack_trace = new ThreadStackTrace(thread, false);
stack_trace->dump_stack_at_safepoint(-1);
_stack_traces[_num_threads++] = stack_trace;
Expand Down

1 comment on commit f527289

@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.