8297964: Jetty.java fails "assert(_no_handle_mark_nesting == 0) failed: allocating handle inside NoHandleMark"

Reviewed-by: egahlin
This commit is contained in:
Markus Grönlund 2022-12-07 11:25:37 +00:00
parent 3e041eb909
commit bfcc238ed0

View File

@ -274,7 +274,10 @@ bool JfrStackTrace::record(JavaThread* jt, const frame& frame, int skip) {
assert(jt != NULL, "invariant");
assert(jt == Thread::current(), "invariant");
assert(!_lineno, "invariant");
HandleMark hm(jt); // RegisterMap uses Handles to support continuations.
// Must use ResetNoHandleMark here to bypass if any NoHandleMark exist on stack.
// This is because RegisterMap uses Handles to support continuations.
ResetNoHandleMark rnhm;
HandleMark hm(jt);
JfrVframeStream vfs(jt, frame, false, false);
u4 count = 0;
_reached_root = true;