changeset 8573:01a99de9d5cb

8087153: EXCEPTION_ACCESS_VIOLATION when CDS RO section vanished on win32 Summary: When mapping RW for debugging support, update space_info->read_only to reflect it is RW Reviewed-by: dcubed, coleenp, iklam
author cjplummer
date Fri, 19 Jun 2015 14:23:39 -0700
parents 8869bb2bc262
children 2e5dfcbc8a5a
files src/share/vm/memory/filemap.cpp
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/filemap.cpp	Thu Jun 18 16:28:04 2015 -0400
+++ b/src/share/vm/memory/filemap.cpp	Fri Jun 19 14:23:39 2015 -0700
@@ -622,19 +622,15 @@
   size_t alignment = os::vm_allocation_granularity();
   size_t size = align_size_up(used, alignment);
   char *requested_addr = _header->region_addr(i);
-  bool read_only;
 
   // If a tool agent is in use (debugging enabled), we must map the address space RW
   if (JvmtiExport::can_modify_any_class() || JvmtiExport::can_walk_any_space()) {
-    read_only = false;
-  } else {
-    read_only = si->_read_only;
+    si->_read_only = false;
   }
 
-
   // map the contents of the CDS archive in this memory
   char *base = os::map_memory(_fd, _full_path, si->_file_offset,
-                              requested_addr, size, read_only,
+                              requested_addr, size, si->_read_only,
                               si->_allow_exec);
   if (base == NULL || base != requested_addr) {
     fail_continue("Unable to map %s shared space at required address.", shared_region_name[i]);