< prev index next >

src/hotspot/share/memory/archiveUtils.inline.hpp

Print this page

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -50,10 +50,11 @@
   } else {
     assert(old_ptr != NULL, "bits for NULL pointers should have been cleaned at dump time");
   }
 
   address new_ptr = old_ptr + _delta;
+  assert(new_ptr != NULL, "don't point to the bottom of the archive"); // See ArchivePtrMarker::mark_pointer().
   assert(_valid_new_base <= new_ptr && new_ptr < _valid_new_end, "must be");
 
   DEBUG_ONLY(log_trace(cds, reloc)("Patch2: @%8d [" PTR_FORMAT "] " PTR_FORMAT " -> " PTR_FORMAT,
                                    (int)offset, p2i(p), p2i(old_ptr), p2i(new_ptr)));
   *p = new_ptr;
< prev index next >