8229437: assert(is_aligned(ref, HeapWordSize)) failed: invariant
authormgronlun
Mon, 02 Sep 2019 13:57:15 +0200
changeset 57979 94481c2b9388
parent 57978 be5865bda5b9
child 57980 ca9e3b68a969
8229437: assert(is_aligned(ref, HeapWordSize)) failed: invariant Reviewed-by: egahlin
src/hotspot/share/jfr/leakprofiler/chains/bfsClosure.cpp
src/hotspot/share/jfr/leakprofiler/chains/dfsClosure.cpp
--- 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);
 }