8229437: assert(is_aligned(ref, HeapWordSize)) failed: invariant
Reviewed-by: egahlin
--- a/src/hotspot/share/jfr/leakprofiler/chains/bfsClosure.cpp Mon Aug 12 19:20:12 2019 +0200
+++ b/src/hotspot/share/jfr/leakprofiler/chains/bfsClosure.cpp Mon Sep 02 13:57:15 2019 +0200
@@ -230,8 +230,6 @@
void BFSClosure::do_root(const oop* ref) {
assert(ref != NULL, "invariant");
- assert(is_aligned(ref, HeapWordSize), "invariant");
- assert(*ref != NULL, "invariant");
if (!_edge_queue->is_full()) {
_edge_queue->add(NULL, ref);
}
--- a/src/hotspot/share/jfr/leakprofiler/chains/dfsClosure.cpp Mon Aug 12 19:20:12 2019 +0200
+++ b/src/hotspot/share/jfr/leakprofiler/chains/dfsClosure.cpp Mon Sep 02 13:57:15 2019 +0200
@@ -178,8 +178,7 @@
void DFSClosure::do_root(const oop* ref) {
assert(ref != NULL, "invariant");
- assert(is_aligned(ref, HeapWordSize), "invariant");
- const oop pointee = *ref;
+ const oop pointee = UnifiedOop::dereference(ref);
assert(pointee != NULL, "invariant");
closure_impl(ref, pointee);
}