Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}