提交 2ca675da 编写于 作者: S stefank

8004697: SIGSEGV on Solaris sparc with -XX:+UseNUMA

Summary: Don't scan pages outside the given range.
Reviewed-by: jwilhelm, jmasa
上级 9aa55e35
......@@ -2945,7 +2945,7 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info
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++;
}
......
......@@ -948,6 +948,8 @@ void MutableNUMASpace::LGRPSpace::scan_pages(size_t page_size, size_t page_count
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册