< prev index next >
src/hotspot/share/runtime/handles.cpp
Print this page
@@ -24,10 +24,12 @@
#include "precompiled.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/constantPool.hpp"
#include "oops/oop.inline.hpp"
+#include "oops/valueKlass.hpp"
+#include "runtime/atomic.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/thread.inline.hpp"
#ifdef ASSERT
oop* HandleArea::allocate_handle(oop obj) {
@@ -94,11 +96,14 @@
uintx handles_visited = top - bottom;
assert(top >= bottom && top <= (oop*) chunk->top(), "just checking");
// during GC phase 3, a handle may be a forward pointer that
// is not yet valid, so loosen the assertion
while (bottom < top) {
- f->do_oop(bottom++);
+ if (Universe::heap()->is_in_reserved_or_null(*bottom)) {
+ f->do_oop(bottom);
+ }
+ bottom++;
}
return handles_visited;
}
void HandleArea::oops_do(OopClosure* f) {
< prev index next >