8004697: SIGSEGV on Solaris sparc with -XX:+UseNUMA
Don't scan pages outside the given range. Reviewed-by: jwilhelm, jmasa
This commit is contained in:
parent
1aa6c27298
commit
1e1174e0be
@ -2945,7 +2945,7 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info
|
|||||||
while (p < (uint64_t)end) {
|
while (p < (uint64_t)end) {
|
||||||
addrs[0] = p;
|
addrs[0] = p;
|
||||||
size_t addrs_count = 1;
|
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[addrs_count] = addrs[addrs_count - 1] + page_size;
|
||||||
addrs_count++;
|
addrs_count++;
|
||||||
}
|
}
|
||||||
|
@ -948,6 +948,8 @@ void MutableNUMASpace::LGRPSpace::scan_pages(size_t page_size, size_t page_count
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (e != scan_end) {
|
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())
|
if ((page_expected.size != page_size || page_expected.lgrp_id != lgrp_id())
|
||||||
&& page_expected.size != 0) {
|
&& page_expected.size != 0) {
|
||||||
os::free_memory(s, pointer_delta(e, s, sizeof(char)), page_size);
|
os::free_memory(s, pointer_delta(e, s, sizeof(char)), page_size);
|
||||||
|
Loading…
Reference in New Issue
Block a user