< prev index next >
src/hotspot/share/memory/archiveUtils.inline.hpp
Print this page
@@ -32,11 +32,15 @@
inline bool SharedDataRelocator<COMPACTING>::do_bit(size_t offset) {
address* p = _patch_base + offset;
assert(_patch_base <= p && p < _patch_end, "must be");
address old_ptr = *p;
+ if (old_ptr == NULL) {
+ assert(COMPACTING, "NULL pointers should not be marked when relocating at run-time");
+ } else {
assert(_valid_old_base <= old_ptr && old_ptr < _valid_old_end, "must be");
+ }
if (COMPACTING) {
// Start-up performance: use a template parameter to elide this block for run-time archive
// relocation.
assert(Arguments::is_dumping_archive(), "Don't do this during run-time archive loading!");
< prev index next >