changeset 4337:ca9580859cf4

8004697: SIGSEGV on Solaris sparc with -XX:+UseNUMA Summary: Don't scan pages outside the given range. Reviewed-by: jwilhelm, jmasa
author stefank
date Mon, 11 Mar 2013 02:24:01 -0700
parents 1c88b99a2b01
children 62609ffa2fc6 eac371996b44
files src/os/solaris/vm/os_solaris.cpp src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/solaris/vm/os_solaris.cpp	Tue Mar 12 09:42:24 2013 +0100
+++ b/src/os/solaris/vm/os_solaris.cpp	Mon Mar 11 02:24:01 2013 -0700
@@ -2945,7 +2945,7 @@
   while (p < (uint64_t)end) {
     addrs[0] = p;
     size_t addrs_count = 1;
-    while (addrs_count < MAX_MEMINFO_CNT && addrs[addrs_count - 1] < (uint64_t)end) {
+    while (addrs_count < MAX_MEMINFO_CNT && addrs[addrs_count - 1] + page_size < (uint64_t)end) {
       addrs[addrs_count] = addrs[addrs_count - 1] + page_size;
       addrs_count++;
     }
--- a/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp	Tue Mar 12 09:42:24 2013 +0100
+++ b/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp	Mon Mar 11 02:24:01 2013 -0700
@@ -948,6 +948,8 @@
       break;
     }
     if (e != scan_end) {
+      assert(e < scan_end, err_msg("e: " PTR_FORMAT " scan_end: " PTR_FORMAT, e, scan_end));
+
       if ((page_expected.size != page_size || page_expected.lgrp_id != lgrp_id())
           && page_expected.size != 0) {
         os::free_memory(s, pointer_delta(e, s, sizeof(char)), page_size);