8259574: SIGSEGV in BFSClosure::closure_impl

Reviewed-by: stefank, egahlin
This commit is contained in:
Markus Grönlund 2021-01-18 10:22:16 +00:00
parent d5ca3b3fd5
commit cd25bf2ee7
3 changed files with 2 additions and 3 deletions
src/hotspot/share/jfr
leakprofiler/chains
recorder/repository

@ -229,7 +229,7 @@ void BFSClosure::do_oop(narrowOop* ref) {
}
void BFSClosure::do_root(UnifiedOopRef ref) {
assert(!ref.is_null(), "invariant");
assert(ref.dereference() != NULL, "pointee must not be null");
if (!_edge_queue->is_full()) {
_edge_queue->add(NULL, ref);
}

@ -57,7 +57,7 @@ template <typename Delegate>
void RootSetClosure<Delegate>::do_oop(narrowOop* ref) {
assert(ref != NULL, "invariant");
assert(is_aligned(ref, sizeof(narrowOop)), "invariant");
if (CompressedOops::is_null(*ref)) {
if (!CompressedOops::is_null(*ref)) {
_delegate->do_root(UnifiedOopRef::encode_in_native(ref));
}
}

@ -524,7 +524,6 @@ class JavaThreadInVMAndNative : public StackObj {
};
static void post_events(bool exception_handler, Thread* thread) {
DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(thread));
if (exception_handler) {
EventShutdown e;
e.set_reason("VM Error");