Skip to content
Permalink
Browse files
8263242: serviceability/sa/ClhsdbFindPC.java cannot find MaxJNILocalC…
…apacity with ASLR

Reviewed-by: kevinw, ysuenaga
  • Loading branch information
plummercj committed May 18, 2021
1 parent e6705c0 commit 10236e7a52a2dd117c3639d020cfe294797f57af
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c
@@ -187,8 +187,9 @@ static bool fill_addr_info(lib_info* lib) {
lib->exec_end = (uintptr_t)-1L;
for (ph = phbuf, cnt = 0; cnt < ehdr.e_phnum; cnt++, ph++) {
if (ph->p_type == PT_LOAD) {
uintptr_t aligned_start = align_down(lib->base + ph->p_vaddr, ph->p_align);
uintptr_t aligned_end = align_up(aligned_start + ph->p_filesz, ph->p_align);
uintptr_t unaligned_start = lib->base + ph->p_vaddr;
uintptr_t aligned_start = align_down(unaligned_start, ph->p_align);
uintptr_t aligned_end = align_up(unaligned_start + ph->p_memsz, ph->p_align);
if ((lib->end == (uintptr_t)-1L) || (lib->end < aligned_end)) {
lib->end = aligned_end;
}
@@ -540,4 +541,3 @@ ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset) {
print_debug("ps_lgetfpregs not implemented\n");
return PS_OK;
}

1 comment on commit 10236e7

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 10236e7 May 18, 2021

Please sign in to comment.